Reboot Script for Linksys WAP200 access points

Since the Linksys WAP200 has a tendency to hang and not let any users connect anymore, this little script to reboot an accesspoint (webinterface still works fine). Replace user and password with correct values.

7 thoughts on “Reboot Script for Linksys WAP200 access points

  1. sry for the late response, seems the server stopped sending me emails for new comments.

    I’m not sure how to solve the problem in a windows environment. The script is written in bash to be executed from a linux host.

    Basically it just opens up https://$ip_of_access_point/reboot.cgi and sends “DeviceReboot=1&page=AdminReboot.htm” as POST data. If you google for “powershell http post” there should be some useful tipps on how to build this in powershell/windows.

  2. I tried the script but id did not work for me, could be with the latest firmare?
    Changing the wget solved it.

    wget -q -O – –user=foouser –password=foopass –no-check-certificate https://${1}/reboot.cgi?todo=reboot >/dev/null

    I removed the –post-data and added ?todo=reboot

  3. I added a ping to the host that the script will restart.
    ————————————————————————-

    #!/bin/bash
    echo "########################### This script will ping: ${1} and restart it, if its up and running. Hold on.... ###########################"
    if [[ "$#" == "1" ]]
    then
    #First ping the host to check if its up.....
    ping -q -c 4 ${1}

    if [ $? -eq 0 ]; then

    nc -w1 -z $1 443
    if [[ "$?" == "0" ]]
    then
    echo "########################### ${1} IS UP. SENDING RESTART COMMAND: https://${1}/reboot.cgi?todo=reboot ###########################"
    wget -q -O - --user=foouser --password=foopass --no-check-certificate https://${1}/reboot.cgi?todo=reboot >/dev/null
    echo "########################### Done! Try reconnecting to it in a couple of seconds. ###########################"
    else
    echo "########################### Could not connect to https webinterface on ${1}, exiting ###########################"
    fi

    else
    echo "########################### HOST: ( ${1} ) HOST IS DOWN! ###########################"
    fi
    else
    echo "########################### Usage: $(basename $0) ###########################"
    fi

Comments are closed.