There is a group of TP-Link TL-WA901ND and TL-WA901N routers. It is necessary to reboot the routers remotely at the specified time. They do not know how to TELNET and SSH only through App TP-Link Tether.
I found script, but I can’t figure out how to translate it for MT (Tools / Fetch)
# in OSX (using cURL):
curl --user username:password http://192.168.1.1/userRpm/SysRebootRpm.htm?Reboot=Reboot > /dev/null
# If you have wget by default instead of cURL (i.e. most *nix):
wget -qO- --user=username --password=password http://192.168.1.1/userRpm/SysRebootRpm.htm?Reboot=Reboot > /dev/null
Assuming your curl method’s still valid then you may try this:
/tool fetch url="http://192.168.1.1/userRpm/SysRebootRpm.htm\?Reboot=Reboot" user=admin password=admin output=none
Checked not rebooted
/tool fetch url="http://192.168.1.1/userRpm/SysRebootRpm.htm?Reboot=Reboot" user=admin password=admin output=none
Suggested on the forum TP-LINK try this script:
#!/bin/sh
WATCHED_IP="8.8.8.8"
ROUTER_IP="192.168.1.1"
USERNAME="login"
PASSWORD="pass"
# watch for remote host
ping -q -c 1 "$WATCHED_IP" > /dev/null && exit
# exit if router is down
ping -q -c 1 "$ROUTER_IP" > /dev/null || exit
curl --basic --user "$USERNAME:$PASSWORD" -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" --referer "http://$ROUTER_IP" "$ROUTER_IP/userRpm/SysRebootRpm.htm?Reboot=reboot"
Replace ROUTER_IP, USERNAME and PASSWORD with your actual values.