Fehlertexte angepasst; batctl Version test erstellt
This commit is contained in:
parent
46d9553169
commit
2bbba5e722
@ -12,22 +12,21 @@
|
||||
# done
|
||||
#}
|
||||
function send_message() {
|
||||
PUSHOVERMESSAGE="$1"
|
||||
|
||||
curl \
|
||||
`#--silent# ` \
|
||||
`#--insecure --proxy "$CURLPROXY" ` \
|
||||
--form-string "token=a5ju5wf34goaqr4juzpeuf2v4iuf4b" \
|
||||
--form-string "user=u44drxvefhqrehxid8f131d9v5nit4" \
|
||||
--form-string "message=$PUSHOVERMESSAGE" \
|
||||
--form-string "title=TITEL" \
|
||||
--form-string "priority=" \
|
||||
--form-string "device=" \
|
||||
https://api.pushover.net/1/messages.json
|
||||
PUSHOVERMESSAGE="$1"
|
||||
|
||||
curl \
|
||||
`#--silent# ` \
|
||||
`#--insecure --proxy "$CURLPROXY" ` \
|
||||
--form-string "token=a5ju5wf34goaqr4juzpeuf2v4iuf4b" \
|
||||
--form-string "user=u44drxvefhqrehxid8f131d9v5nit4" \
|
||||
--form-string "message=$PUSHOVERMESSAGE" \
|
||||
--form-string "title=Gateway Status" \
|
||||
--form-string "priority=" \
|
||||
--form-string "device=" \
|
||||
https://api.pushover.net/1/messages.json
|
||||
}
|
||||
|
||||
|
||||
fehlermeldung="$(hostname)"
|
||||
|
||||
#ping -c 4 -i mullvad 8.8.8.8
|
||||
#Mullvad test
|
||||
@ -35,7 +34,7 @@ if ! ping -c 4 -I mullvad 8.8.8.8 > /dev/null 2>&1
|
||||
then
|
||||
echo "Mullvad-Tunnel broken"
|
||||
fehler=1
|
||||
fehlermeldung="$fehlermeldung Mullvad"
|
||||
fehlermeldung="$fehlermeldung\nMullvad-Tunnel broken"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
@ -45,7 +44,7 @@ if ! ping -c 4 -I fff-has 10.50.252.158 > /dev/null 2>&1
|
||||
then
|
||||
echo "GRE fff-has broken"
|
||||
fehler=1
|
||||
fehlermeldung="$fehlermeldung fff-has"
|
||||
fehlermeldung="$fehlermeldung\nGRE-Tunnel: fff-has broken"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
@ -55,7 +54,7 @@ if ! ping -c 4 -I fff-has2 10.50.252.160 > /dev/null 2>&1
|
||||
then
|
||||
echo "GRE fff-has2 broken"
|
||||
fehler=1
|
||||
fehlermeldung="$fehlermeldung fff-has2"
|
||||
fehlermeldung="$fehlermeldung\nGRE-Tunnel: fff-has2 broken"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
@ -65,7 +64,17 @@ if ! ping -c 4 -I fff-wue1 10.50.252.164 > /dev/null 2>&1
|
||||
then
|
||||
echo "GRE fff-wue1 broken"
|
||||
fehler=1
|
||||
fehlermeldung="$fehlermeldung fff-wue1"
|
||||
fehlermeldung="$fehlermeldung\nGRE-Tunnel: fff-wue1 broken"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
|
||||
if [ ! "$(batctl -v | awk '{print $2}')" = "2013.4.0" ]
|
||||
then
|
||||
echo "batctl: Version falsch"
|
||||
fehler=1
|
||||
fehlermeldung="$fehlermeldung\nbatctl: Version falsch"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user