check_inet.sh hinzugefügt
This commit is contained in:
14
check_inet.sh
Normal file
14
check_inet.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
ping -c4 www.google.com
|
||||
let a=$?
|
||||
if [ "$a" != "0" ]; then
|
||||
/sbin/shutdown -r +1 Connection lost, rebooting...
|
||||
fi
|
||||
|
||||
# ToDo afterwards
|
||||
# make executable
|
||||
# chmod +x check_inet.sh
|
||||
|
||||
# add in crontab
|
||||
# */30 * * * * /home/yourname/check_inet.sh
|
||||
Reference in New Issue
Block a user