]> git.pld-linux.org Git - packages/func.git/commitdiff
- unify, update descs, runlevel setup
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 10 Oct 2010 19:22:40 +0000 (19:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    func-funcd.init -> 1.5

func-funcd.init

index 712c6ec1d5141f221f39613d8d8f5183a7cc0d87..e5b1c7022c7a0e99749528cf94f84850d8f1c92a 100644 (file)
@@ -1,10 +1,11 @@
 #!/bin/sh
 #
-# funcd        funcd short service description
+# funcd    Fedora Unified Network Control
 #
-# chkconfig:   2345 98 2
+# chkconfig:   2345 98 02
 #
-# description: funcd long service description
+# description:  Crazy simple, secure remote management.
+# processname: /usr/bin/funcd
 #
 # $Id$
 
@@ -20,7 +21,7 @@
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
        if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
-               msg_network_down funcd
+               msg_network_down "funcd"
                exit 1
        fi
 else
@@ -29,39 +30,41 @@ fi
 
 start() {
        # Check if the service is already running?
-       if [ ! -f /var/lock/subsys/funcd ]; then
-               msg_starting funcd
-               daemon /usr/bin/funcd --daemon
-               RETVAL=$?
-               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/funcd
-       else
-               msg_already_running funcd
+       if [ -f /var/lock/subsys/funcd ]; then
+               msg_already_running "funcd"
+               return
        fi
+
+       msg_starting "funcd"
+       daemon /usr/bin/funcd --daemon
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/funcd
 }
 
 stop() {
-       if [ -f /var/lock/subsys/funcd ]; then
-               # Stop daemons.
-               msg_stopping funcd
-               killproc --pidfile /var/run/funcd.pid funcd -TERM
-               rm -f /var/lock/subsys/funcd
-       else
-               msg_not_running funcd
+       if [ ! -f /var/lock/subsys/funcd ]; then
+               msg_not_running "funcd"
+               return
        fi
+
+       # Stop daemons.
+       msg_stopping "funcd"
+       killproc --pidfile /var/run/funcd.pid funcd -TERM
+       rm -f /var/lock/subsys/funcd
 }
 
 condrestart() {
-       if [ -f /var/lock/subsys/funcd ]; then
-               stop
-               start
-       else
-               if [ $1 -ne 0 ]; then
-                       msg_not_running funcd
-               fi
+       if [ ! -f /var/lock/subsys/funcd ]; then
+               msg_not_running "funcd"
                RETVAL=$1
+               return
        fi
+
+       stop
+       start
 }
 
+
 RETVAL=0
 # See how we were called.
 case "$1" in
This page took 0.055999 seconds and 4 git commands to generate.