In germany, our ISPs provide us a nasty thing called „24h reconnect“. Every 24 hours, the DSL connection is reseted (don’t ask why. They claim to have good reasons…). Certain manufacturers of DSL routers/access points adapted to the german market and provide a feature to reconnect at a certain time (like 04:00am when nobody’s working).
Unfortunately my cheap TP-Link router does not have such a feature. So I wrote a small script which is called via crontab from my RaspberryPi at 04:00am
sessionKey=$(curl --user admin:password "http://192.168.1.1/resetrouter.html" 2> /dev/null | grep sessionKey | cut -d "'" -f 2)
curl --user admin:password $url &> /dev/null