Last active
July 24, 2021 16:53
-
-
Save P8H/e1a4f4a6afe4c5da7ceb to your computer and use it in GitHub Desktop.
Watchdog install script for Raspberry Pi
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
# Watchdog install script for raspberry pi | |
# based on http://binerry.de/post/28263824530/raspberry-pi-watchdog-timer | |
# first think about to update the firmaware: rpi-update | |
sudo bash | |
apt-get install watchdog chkconfig | |
modprobe bcm2708_wdog | |
echo "WantedBy=multi-user.target" >> /lib/systemd/system/watchdog.service | |
# http://raspberrypi.stackexchange.com/a/33901 | |
chkconfig watchdog on | |
systemctl enable watchdog | |
echo "watchdog-device = /dev/watchdog" >> /etc/watchdog.conf | |
echo "watchdog-timeout = 10" >> /etc/watchdog.conf # timeout 10 seconds | |
echo 'watchdog_module="bcm2708_wdog"' >> /etc/default/watchdog | |
# optional: if there is less than 1 page of free memory (=4k), then the watchdog will reboot the pi | |
echo "min-memory = 1" >> /etc/watchdog.conf | |
systemctl start watchdog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment