...
Below code works more accurately at AsusWRT
| Code Block | ||||
|---|---|---|---|---|
| ||||
#!/bin/ash
if [ $( ping -c 1 google.com | grep ttl | wc -l ) -eq 0 ]
then
echo noreply
/sbin/reboot
else
echo "google.com is reachable"
fi |
...
...
Below code works more accurately at AsusWRT
| Code Block | ||||
|---|---|---|---|---|
| ||||
#!/bin/ash
if [ $( ping -c 1 google.com | grep ttl | wc -l ) -eq 0 ]
then
echo noreply
/sbin/reboot
else
echo "google.com is reachable"
fi |
...