Skip to content

Instantly share code, notes, and snippets.

@jameswhite
Created December 30, 2016 00:29
Show Gist options
  • Select an option

  • Save jameswhite/bc5f4b16e61c729728fe0a4ab6198840 to your computer and use it in GitHub Desktop.

Select an option

Save jameswhite/bc5f4b16e61c729728fe0a4ab6198840 to your computer and use it in GitHub Desktop.
enable the hardware watchdog in raspbian
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 /etc/init.d/watchdog start
sudo modprobe bcm2835_wdt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment