diff --git a/start.sh b/start.sh index efafc37..d5b0d31 100644 --- a/start.sh +++ b/start.sh @@ -18,7 +18,7 @@ fi function send_webhook() { local message="$1" - curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"$message\"}" "$webhook" + curl --silent -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"$message\"}" "$webhook" } vpns=$(nmcli connection show | grep vpn | awk '{print $1}') @@ -76,6 +76,10 @@ do exit fi + if [ -n "$webhook_url" ]; then + send_webhook "Next schedule: $next_time" + fi + while [ $next_seconds -gt 0 ] do echo -ne "\033[0K\rWaiting for $next_time... (in $next_seconds s) "