Skip to content

Instantly share code, notes, and snippets.

View sgrayban's full-sized avatar
💭
Mastering the Rpi

Scott Grayban sgrayban

💭
Mastering the Rpi
View GitHub Profile
@sgrayban
sgrayban / lan_watchdog.sh
Last active November 4, 2021 05:01
Reboot a Raspberry Pi if LAN is unreachable
#!/bin/bash
#
# Step 1) mkdir -p /root/bin
# Step 2) vi/nano/pico /root/bin/lan_watchdog.sh and edit the line WIFI_GW and add your own gateway IP to ping
# Step 3) chmod +x /root/bin/lan_watchdog.sh
# Step 4) Install at screen and arping `apt install screen arping at`
# Step 5) Add to /etc/rc.local BEFORE exit 0
# # start lan_watchdog to reboot if connection is unavailable
# cd /root/bin/ && echo 'screen -dmS lan_watchdog /root/bin/lan_watchdog.sh' | at now+10min
# Step 6) Make sure everything is connected and correct and reboot the Pi
@sgrayban
sgrayban / keybase.md
Last active September 19, 2017 04:26
Keybase proof

Keybase proof

I hereby claim:

  • I am sgrayban on github.
  • I am sgrayban (https://keybase.io/sgrayban) on keybase.
  • I have a public key ASDTgTBPrfg0q9fUIKD99O4CAs14N__0zrCXyVNdyBjAbgo

To claim this, I am signing this object: