Fix send_webhook

This commit is contained in:
2023-05-18 21:47:57 +02:00
parent 1695fd37f6
commit 47dac3949f

View File

@@ -16,6 +16,11 @@ then
exit
fi
function send_webhook() {
local message="$1"
curl -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}')
host=$(hostname -f)
@@ -154,9 +159,4 @@ do
send_webhook "ERROR: VPN name is empty"
fi
fi
done
send_webhook() {
local message="$1"
curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"$message\"}" "$webhook"
}
done