Below script makes server to reboot if ping does not work
Code Block |
---|
#!/bin/bash
:Begin
ping -c 10 google.com
If %errorlevel% == 1 (
echo noreply
shutdown -r -t 0
)
If %errorlevel% == 0 (
GoTo :End
)
:End |
...
In my case, I run above scripts by cron job in every 10 mins.
If you want to run above script at AsusWRT, you will need to modify the first line as following
Code Block |
---|
#!/bin/sh |