Skip to content

Instantly share code, notes, and snippets.

@agottoli
Last active April 30, 2020 19:49
Show Gist options
  • Save agottoli/2af309ed688aee58b51db444a500ac70 to your computer and use it in GitHub Desktop.
Save agottoli/2af309ed688aee58b51db444a500ac70 to your computer and use it in GitHub Desktop.
Reboot TP-Link Archer C5 if the machine is offline
#!/bin/bash
nc -z -w 5 8.8.8.8 53 >/dev/null 2>&1
online=$?
if [ $online -eq 0 ]; then
echo "Online"
else
echo "Offline"
python3 tplink_archer_c7_router_reset.py
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment