Skip to content

Instantly share code, notes, and snippets.

@ur4ltz
Forked from mdeangelo001/crontab
Created December 1, 2019 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ur4ltz/64f7d2389d889d9a493d3316993d3e16 to your computer and use it in GitHub Desktop.
Save ur4ltz/64f7d2389d889d9a493d3316993d3e16 to your computer and use it in GitHub Desktop.
Reboot dd-wrt router via web interface and curl
# My DD-WRT router would not reboot reliably except by going through the web interface.
# The reboot settings in the UI did not work consistently, and ssh access did not work
# reliably either. I was able to figure out the following curl command that makes the
# basically presses the Reboot Router button on the Administration->Management screen.
# This crontab reboots the router every night at 3:30 am
30 3 * * * /usr/bin/curl --referer http://192.168.1.1/Management.asp -d submit_button=Management -d action=Reboot -u admin:password --http1.1 -v http://192.168.1.1/apply.cgi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment