]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/initscripts/init.d/watchdog
httpscert: Increase size of the RSA key to 4096.
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / watchdog
1 #!/bin/sh
2
3 . /etc/sysconfig/rc
4 . ${rc_functions}
5
6 PATH=/bin:/usr/bin:/sbin:/usr/sbin
7
8 test -x /usr/sbin/watchdog || exit 0
9
10 # For configuration of the init script use the file
11 # /etc/sysconfig/watchdog, do not edit this init script.
12
13 # Set run_watchdog to 1 to start watchdog or 0 to disable it.
14 run_watchdog=0
15
16 # Specify additional watchdog options here (see manpage).
17 watchdog_options=""
18
19 # Specify module to load
20 watchdog_module="none"
21
22 [ -e /etc/sysconfig/watchdog ] && . /etc/sysconfig/watchdog
23
24 DAEMON=/usr/sbin/watchdog
25 WD_DAEMON=/usr/sbin/wd_keepalive
26
27 case "${1}" in
28 start)
29 boot_mesg "Starting watchdog ..."
30 if [ $run_watchdog = 1 ]
31 then
32 # do we have to load a module?
33 [ ${watchdog_module:-none} != "none" ] && /sbin/modprobe $watchdog_module
34
35 loadproc $DAEMON $watchdog_options
36 fi
37 ;;
38
39 stop)
40 boot_mesg "Stopping watchdog ..."
41 killproc $DAEMON
42 ;;
43
44 restart)
45 ${0} stop
46 sleep 1
47 ${0} start
48 ;;
49
50 status)
51 statusproc $DAEMON
52 ;;
53
54 *)
55 echo "Usage: ${0} {start|stop|restart|status}"
56 exit 1
57 ;;
58 esac
59