blob: daa8d064f06da44f21e5658f57f9ab1dda2f946f [file] [log] [blame]
#!/bin/sh
case "$1" in
start)
babysit 10 watchdog 2>&1 | logos watchdog &
;;
stop)
pkill -USR1 -x watchdog
# watchdog sleeps 5
sleep 7
pkillwait -x watchdog
echo "Warning: killing the watchdog may reboot the system." >&2
;;
restart|reload)
$0 stop; $0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac