You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
601 B
19 lines
601 B
#!/bin/bash |
|
|
|
if ping -c 1 o2.de &> /dev/null |
|
then |
|
echo "Sende E-Mail" &> /dev/null |
|
#mail -s "Pingtest" system@hephaistos.schwalbert.net < ./ping.log |
|
#rm ./ping.log |
|
else |
|
date +"%D %T" >> ./ping.log |
|
if ping -c 1 192.168.1.1 &> /dev/null |
|
then |
|
echo "Internet nicht erreichbar: (Ping o2.de fehlgeschlagen, Ping Internetgateway erfolgreich)" >> ./ping.log |
|
else |
|
echo "Netzwerk nicht erreichbar: (Ping o2.de fehlgeschlagen, Ping Internetgateway fehlgeschlagen)" >> ./ping.log |
|
fi |
|
echo "" |
|
fi |
|
|
|
|
|
|