Kommentare aktiviert
This commit is contained in:
parent
ad2284198c
commit
1e797975f5
@ -12,15 +12,15 @@
|
|||||||
# done
|
# done
|
||||||
#}
|
#}
|
||||||
function send_message() {
|
function send_message() {
|
||||||
|
PUSHOVERMESSAGE="$1"
|
||||||
|
|
||||||
curl \
|
curl \
|
||||||
--silent \
|
`#--silent# ` \
|
||||||
`#--insecure --proxy "$CURLPROXY" ` \
|
`#--insecure --proxy "$CURLPROXY" ` \
|
||||||
--form-string "token=a5ju5wf34goaqr4juzpeuf2v4iuf4b" \
|
--form-string "token=a5ju5wf34goaqr4juzpeuf2v4iuf4b" \
|
||||||
--form-string "user=u44drxvefhqrehxid8f131d9v5nit4" \
|
--form-string "user=u44drxvefhqrehxid8f131d9v5nit4" \
|
||||||
--form-string "message=$PUSHOVERMESSAGE" \
|
--form-string "message=$PUSHOVERMESSAGE" \
|
||||||
--form-string "title=$PUSHOVERTITLE" \
|
--form-string "title=TITEL" \
|
||||||
--form-string "priority=" \
|
--form-string "priority=" \
|
||||||
--form-string "device=" \
|
--form-string "device=" \
|
||||||
https://api.pushover.net/1/messages.json
|
https://api.pushover.net/1/messages.json
|
||||||
@ -33,45 +33,46 @@ curl \
|
|||||||
#Mullvad test
|
#Mullvad test
|
||||||
if ! ping -c 4 -I mullvad 8.8.8.8 > /dev/null 2>&1
|
if ! ping -c 4 -I mullvad 8.8.8.8 > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
# echo "Mullvad-Tunnel broken"
|
echo "Mullvad-Tunnel broken"
|
||||||
fehler=1
|
fehler=1
|
||||||
fehlermeldung="$fehlermeldung Mullvad"
|
fehlermeldung="$fehlermeldung Mullvad"
|
||||||
#else
|
else
|
||||||
# echo "OK"
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#fff-has test
|
#fff-has test
|
||||||
if ! ping -c 4 -I fff-has 10.50.252.158 > /dev/null 2>&1
|
if ! ping -c 4 -I fff-has 10.50.252.158 > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
# echo "GRE fff-has broken"
|
echo "GRE fff-has broken"
|
||||||
fehler=1
|
fehler=1
|
||||||
fehlermeldung="$fehlermeldung fff-has"
|
fehlermeldung="$fehlermeldung fff-has"
|
||||||
#else
|
else
|
||||||
# echo "OK"
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if ! ping -c 4 -I fff-has2 10.50.252.160 > /dev/null 2>&1
|
if ! ping -c 4 -I fff-has2 10.50.252.160 > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
# echo "GRE fff-has2 broken"
|
echo "GRE fff-has2 broken"
|
||||||
fehler=1
|
fehler=1
|
||||||
fehlermeldung="$fehlermeldung fff-has2"
|
fehlermeldung="$fehlermeldung fff-has2"
|
||||||
#else
|
else
|
||||||
# echo "OK"
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if ! ping -c 4 -I fff-wue1 10.50.252.164 > /dev/null 2>&1
|
if ! ping -c 4 -I fff-wue1 10.50.252.164 > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
# echo "GRE fff-wue1 broken"
|
echo "GRE fff-wue1 broken"
|
||||||
fehler=1
|
fehler=1
|
||||||
fehlermeldung="$fehlermeldung fff-wue1"
|
fehlermeldung="$fehlermeldung fff-wue1"
|
||||||
#else
|
else
|
||||||
# echo "OK"
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$fehler" = "1" ]
|
if [ "$fehler" = "1" ]
|
||||||
then
|
then
|
||||||
send_message "`hostname`\nFehler: $fehlermeldung down"
|
send_message "`hostname`
|
||||||
|
Fehler: $fehlermeldung down"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user