Код: Выделить всё
#!/bin/sh
echo --------------- --------------- --------------- --
echo WAN CONTROLL RESTART
echo --------------- --------------- --------------- --
PINGRESORCE1="ya.ru"
PINGRESORCE3="google.com"
if (! ping -q -c3 ${PINGRESORCE1} > /dev/null 2>&1)
then
if (! ping -q -c3 ${PINGRESORCE2} > /dev/null 2>&1)
then
usbreset 19d2:1405
else
echo 'internet ok'
fi
else
echo 'internet ok'
fi
Код: Выделить всё
*/30 * * * * /root/ping.sh