summaryrefslogtreecommitdiff
path: root/examples/Watchdog/clewarewatchdog
blob: c7bc3b4638c26dbfa296e67f05bcf4c9d6f1ecdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
#
# Startup script for program
#
# chkconfig: 12345 1 1          - This statement tells the chkconfig command how to add or delete this process to the boot process
# description: Starts the process which pads the Cleware watchdog.
# processname: clewarecontrol

# Source function library.      This creates the operating environment for the process to be started
. /etc/rc.d/init.d/functions

case "$1" in
  start)
        echo -n "Starting Cleware watchdog "
        /usr/bin/clewarecontrol -w
        echo
        touch /var/lock/subsys/clewarecontrol
        ;;
  stop)
        echo -n "Shutting down Cleware watchdog: "
        killproc clewarecontrol
        echo
        rm -f /var/lock/subsys/clewarecontrol
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit 0