]> git.pld-linux.org Git - packages/arpwatch.git/commitdiff
- Standarized all rc scripts.
authorkloczek <kloczek@pld-linux.org>
Sat, 31 Jul 1999 00:36:51 +0000 (00:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    arpwatch.init -> 1.3

arpwatch.init

index c0eb05242f47c7ed6f956793acee5c75c5ce8a08..beffad99bfa792ff54b3b3b73d1a9ecb0778de06 100644 (file)
@@ -5,27 +5,34 @@
 #              address pairings.
 # processname: arpwatch
 
-# Source function library.
+
+# Source function library
 . /etc/rc.d/init.d/functions
 
-# Get config.
+# Get network config
 . /etc/sysconfig/network
 
+# Get service config
+[ -f /etc/sysconfig/arpwatch ] && . /etc/sysconfig/arpwatch
+
 # Check that networking is up.
-if [ "${NETWORKING}" = "no" ]
-then
-       exit 0
-fi
+[ "${NETWORKING}" = "no" ] && echo "Error: Networking is down" && exit 0
+
 
 # See how we were called.
 case "$1" in
   start)
-       show Starting arpwatch:
-       daemon +2 arpwatch
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/arpwatch ]; then
+               show Starting arpwatch
+               daemon arpwatch
+       else
+               echo "arpwatch already is running"
+       fi
        touch /var/lock/subsys/arpwatch
        ;;
   stop)
-       show Stopping arpwatch
+       show Stopping arpwatch
        killproc arpwatch
        rm -f /var/lock/subsys/arpwatch
        ;;
This page took 0.036278 seconds and 4 git commands to generate.