]>
Commit | Line | Data |
---|---|---|
3f4aa73d | 1 | #!/bin/sh |
126507e5 MT |
2 | ######################################################################## |
3 | # Begin $rc_base/init.d/watchdog | |
4 | # | |
5 | # Description : watchdog daemon initscript | |
6 | # | |
7 | ######################################################################## | |
3f4aa73d DW |
8 | |
9 | . /etc/sysconfig/rc | |
10 | . ${rc_functions} | |
11 | ||
126507e5 MT |
12 | if [ -e "/etc/sysconfig/watchdog" ]; then |
13 | . /etc/sysconfig/watchdog | |
14 | fi | |
3f4aa73d DW |
15 | |
16 | case "${1}" in | |
17 | start) | |
126507e5 MT |
18 | if [ -n "${watchdog_module}" ]; then |
19 | modprobe -q "${watchdog_module}" 2>/dev/null | |
20 | fi | |
21 | ||
22 | boot_mesg "Starting watchdog daemon..." | |
23 | loadproc /usr/sbin/watchdog ${watchdog_options} | |
3f4aa73d DW |
24 | ;; |
25 | ||
26 | stop) | |
126507e5 MT |
27 | boot_mesg "Stopping watchdog daemon..." |
28 | killproc /usr/sbin/watchdog | |
3f4aa73d DW |
29 | ;; |
30 | ||
31 | restart) | |
32 | ${0} stop | |
33 | sleep 1 | |
34 | ${0} start | |
35 | ;; | |
36 | ||
37 | status) | |
126507e5 | 38 | statusproc /usr/sbin/watchdog |
3f4aa73d DW |
39 | ;; |
40 | ||
41 | *) | |
42 | echo "Usage: ${0} {start|stop|restart|status}" | |
43 | exit 1 | |
44 | ;; | |
45 | esac | |
46 | ||
126507e5 | 47 | # End $rc_base/init.d/watchdog |