]> git.pld-linux.org Git - packages/cpqarrayd.git/blame - cpqarrayd.init
- add trap destinations param
[packages/cpqarrayd.git] / cpqarrayd.init
CommitLineData
c6f63125 1#!/bin/sh
e3b4c855
ER
2#
3# cpqarrayd Start/Stop Compaq Array monitor
4#
5# chkconfig: 345 15 90
6# description: The cpqarrayd monitors the status of Compaq Raid Arrays, \
7# and reports via syslog or traps
8# processname: cpqarrayd
9
c6f63125 10# Source function library
e3b4c855
ER
11. /etc/rc.d/init.d/functions
12
c30ac04c
ER
13CPQ_PARAMS=""
14
e3b4c855
ER
15# Get config.
16if [ -f /etc/sysconfig/cpqarrayd ]; then
c6f63125 17 . /etc/sysconfig/cpqarrayd
e3b4c855
ER
18fi
19
e3b4c855 20RETVAL=0
e3b4c855
ER
21# See how we were called.
22case "$1" in
c6f63125
ER
23start)
24 # Check if the service is already running?
25 if [ ! -f /var/lock/subsys/cpqarrayd ]; then
26 msg_starting cpqarrayd
c30ac04c
ER
27 for host in $TRAP_DESTINATIONS; do
28 CPQ_PARAMS="$CPQ_PARAMS -t $host"
29 done
c6f63125
ER
30 daemon cpqarrayd $CPQ_PARAMS
31 RETVAL=$?
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cpqarrayd
33 else
34 msg_already_running cpqarrayd
35 fi
36 ;;
37stop)
38 if [ -f /var/lock/subsys/cpqarrayd ]; then
39 # Stop daemons.
40 msg_stopping cpqarrayd
41 killproc cpqarrayd
42 rm -f /var/lock/subsys/cpqarrayd
43 else
44 msg_not_running cpqarrayd
45 fi
46 ;;
47restart|reload|force-reload)
48 $0 stop
49 $0 start
50 RETVAL=$?
51 ;;
52status)
53 status cpqarrayd
54 RETVAL=$?
55 ;;
56*)
57 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
58 exit 3
e3b4c855
ER
59esac
60
61exit $RETVAL
This page took 0.10501 seconds and 4 git commands to generate.