Created
February 5, 2017 18:04
-
-
Save jameswhite/312ead576f32de3ed83f17d780ef3718 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| grep -q "bcm2835_wdt" /etc/modules || echo "bcm2835_wdt" | sudo tee -a /etc/modules | |
| dpkg -l | grep -q "ii *watchdog" || sudo apt-get install -y watchdog | |
| [ ! -f /etc/watchdog.conf.dist ] && sudo cp /etc/watchdog.conf /etc/watchdog.conf.dist | |
| cat<<EOF | sudo tee /etc/watchdog.conf | |
| max-load-1 = 24 | |
| watchdog-device = /dev/watchdog | |
| realtime = yes | |
| priority = 1 | |
| EOF | |
| sudo update-rc.d watchdog defaults | |
| # sudo update-rc.d watchdog enable 2 | |
| sudo /etc/init.d/watchdog start | |
| sudo modprobe bcm2835_wdt | |
| # add: /lib/systemd/system/watchdog.service | |
| [Install] | |
| WantedBy=multi-user.target | |
| # Then | |
| systemctl enable watchdog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment