1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Startup Script To Reboot If Connection Is Lost

Discussion in 'HyperWRT Firmware' started by barakaspeed, Nov 12, 2006.

  1. barakaspeed

    barakaspeed Network Guru Member

    I've been trying to search for a script where my WRT54GL v1.1 Thibor15c would reboot if my internet connection is lost. My router is configured as "Client Mode" which is connecting to another router that is serving as the gateway to the internet. The reason I needed this script is my "Client Mode" router would loose the wireless connection randomly and would require me to do a manual reboot.

    I just gave myself a crash course in shell scripting via the aid of google! Here is my startup script that is working for me:

    sleep 60
    while [ "`ping -c 3|grep 100%`" == "" ]
    sleep 600


    Note: is the gateway ip address of my gateway router.

    Those darn apostrophe's in the above script need to be the reverse ones, the apostrophe that shares the "~" key. Took me like 2 hours to realize this!

    Yeah I know it's probably pretty basic for a lot of you, but after searching these forums I found a lot of others asking for something like this with no script being given.

    Anyways, I'm still pretty new here so I just wanted to say thanks to everyone for making this forum as great as it is! Also thanks Thibor for such a solid firmware!


Share This Page