Skip to content

Instantly share code, notes, and snippets.

View agottoli's full-sized avatar

Alessandro Gottoli agottoli

View GitHub Profile
@agottoli
agottoli / reboot-if-offline.sh
Last active April 30, 2020 19:49
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