3 # apinger Start/stop the Alarm Pinger daemon.
5 # chkconfig: 2345 80 20
7 # description: apinger is a simple ICMP-echo based network monitor
10 # config: /etc/apinger.conf
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 [ -f /etc/sysconfig/apinger ] && . /etc/sysconfig/apinger
18 # See how we were called.
21 # Check if the service is already running?
22 if [ ! -f /var/lock/subsys/apinger ]; then
23 msg_starting Alarm Pinger
26 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/apinger
28 msg_Already_Running Alarm Pinger
34 if [ -f /var/lock/subsys/apinger ]; then
35 msg_stopping Alarm Pinger
37 rm -f /var/lock/subsys/apinger >/dev/null 2>&1
39 msg_Not_Running Alarm Pinger
55 msg_Usage: "$0 {start|stop|status|restart}"