Last active
July 24, 2021 16:53
-
-
Save itskenny0/7d8bd57d65fa2ea68e18ad2efc9226ea to your computer and use it in GitHub Desktop.
feeding the watchdog on a Raspberry Pi Zero
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 | |
exec 5>/dev/watchdog # opens file descriptor | |
upSeconds="$(cat /proc/uptime | grep -o '^[0-9]\+')" | |
while [ $(cat /proc/uptime | grep -o '^[0-9]\+') -lt 432000 ] ; do | |
echo "Feeding dog ..." | |
echo >&5 | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment