Python Script to Reboot the LinkSys EA3500 router

this is followup of How to SSH on LINKSYS ROUTER with USB Port, I shall now detail the Python Script which is running on my Synology NAS 712 connected to the LINKSYS EA3500 router.

pls read the post Rebooting the ADSL Router when it cannot Access Internet to ready the NAS for running the python script. module required is “pexpect”.

save the script in /volume1/myScripts/ a share folder and make a log file /volume1/myScripts/mxHomeEA3500.log. Now we can configure the NAS to Run the Python Script

Step 1: go to Control panel > Task Scheduler

Step 2: Create a new Task Scheduler > user script

Step 3: Follow the Step on Image
general tab

Step 4:Ensure you select the schedule as per the requirement; in this case a test every Hrs look reasonable and the reboot is initiated only if the google website is not reachable

Step 5: to Test the script by clicking RUN

If not working or error, ie you do not see the EA3500 rebooting, Follow the following Step

Step 6: SSH to the NAS as root and run the script from prompt

check the outputs on the terminal for Error; maybe you should uncomment lines in script to make the debug easy.

Posted in Network Hardware, Storage and tagged , , , , , .

One Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.