]> git.pld-linux.org Git - packages/apinger.git/commitdiff
apinger init script
authorJacek Konieczny <jajcus@pld-linux.org>
Fri, 12 Jul 2002 08:55:20 +0000 (08:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apinger.init -> 1.1

apinger.init [new file with mode: 0644]

diff --git a/apinger.init b/apinger.init
new file mode 100644 (file)
index 0000000..88229ce
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# apinger       Start/stop the Alarm Pinger daemon.
+#
+# chkconfig:   2345 80 20
+#
+# description: apinger is a simple ICMP-echo based network monitor
+#
+# processname: apinger
+# config:      /etc/apinger.conf
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/apinger ] && . /etc/sysconfig/apinger
+
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/apinger ]; then
+               msg_starting Alarm Pinger
+               daemon apinger
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/apinger
+       else
+               msg_Already_Running Alarm Pinger
+               exit 1
+       fi
+       ;;
+  stop)
+        # Stop daemons.
+        if [ -f /var/lock/subsys/apinger ]; then
+                msg_stopping Alarm Pinger
+                killproc apinger
+                rm -f /var/lock/subsys/apinger >/dev/null 2>&1
+        else
+                msg_Not_Running Alarm Pinger
+                exit 1
+        fi
+                                                                                                                                       
+       ;;
+  status)
+       status apinger
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  *)
+       msg_Usage: "$0 {start|stop|status|restart}"
+       exit 1
+esac
+
+exit $RETVAL
This page took 0.109431 seconds and 4 git commands to generate.