Have a script written to me. If the USB modem loses internet, it automatically reconnects. The script works 2-3 times. After that it no longer work and I have to reboot the router.
the script
#!/bin/sh
if ping -w 10 -c 1 212.247.8.38 > /dev/null; then
echo "SERVERNAME=on"
else
echo "SERVERNAME=off"
modprobe -r ohci_hcd
sleep 5
modprobe -r ehci_hcd
sleep 15s
modprobe ehci_hcd
sleep 5s
modprobe ohci_hcd
fi
or Is there another command to start USB modem.
the script
#!/bin/sh
if ping -w 10 -c 1 212.247.8.38 > /dev/null; then
echo "SERVERNAME=on"
else
echo "SERVERNAME=off"
modprobe -r ohci_hcd
sleep 5
modprobe -r ehci_hcd
sleep 15s
modprobe ehci_hcd
sleep 5s
modprobe ohci_hcd
fi
or Is there another command to start USB modem.