watchdog 373 B

1234567891011121314151617
  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2008-2010 OpenWrt.org
  3. START=25
  4. start() {
  5. [ -c /dev/watchdog -a -x /sbin/watchdog ] || {
  6. echo "WARNING: Watchdog not available. System will reboot soon!"
  7. return 1
  8. }
  9. /sbin/watchdog -T 63 -t 50 /dev/watchdog
  10. [ -x /usr/bin/schedtool ] && /usr/bin/schedtool -R -p 60 -n -20 $(pidof watchdog)
  11. }
  12. stop() {
  13. killall -q watchdog
  14. }