Last active
April 30, 2020 19:49
-
-
Save agottoli/2af309ed688aee58b51db444a500ac70 to your computer and use it in GitHub Desktop.
Reboot TP-Link Archer C5 if the machine is offline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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