]> git.ipfire.org Git - ipfire-2.x.git/blame - src/initscripts/init.d/watchdog
Add wireless client for RED to startup process.
[ipfire-2.x.git] / src / initscripts / init.d / watchdog
CommitLineData
3f4aa73d
DW
1#!/bin/sh
2
3. /etc/sysconfig/rc
4. ${rc_functions}
5
6PATH=/bin:/usr/bin:/sbin:/usr/sbin
7
8test -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.
14run_watchdog=0
15
16# Specify additional watchdog options here (see manpage).
17watchdog_options=""
18
19# Specify module to load
20watchdog_module="none"
21
22[ -e /etc/sysconfig/watchdog ] && . /etc/sysconfig/watchdog
23
24DAEMON=/usr/sbin/watchdog
25WD_DAEMON=/usr/sbin/wd_keepalive
26
27case "${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 ;;
58esac
59