What's new

Script problem with reconnection

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

vaszago

Regular Contributor
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.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top