]> git.pld-linux.org Git - packages/git-core.git/commitdiff
- unify
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 14 Oct 2010 14:03:10 +0000 (14:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    git-core.init -> 1.5

git-core.init

index 5dade3c8e31b2928f0cc1c9b2350a0598da3f11e..c030185df6f0e9c824758e6139aa5fb0e8a53a54 100644 (file)
@@ -22,7 +22,7 @@ DAEMON_OPTS="--syslog"
 # 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 git-daemon
+               msg_network_down "git-daemon"
                exit 1
        fi
 else
@@ -31,46 +31,50 @@ fi
 
 start() {
        # Check if the service is already running?
-       if [ ! -f /var/lock/subsys/git-daemon ]; then
-               msg_starting git-daemon
-               daemon --fork @libdir@/git-core/git-daemon $DAEMON_OPTS
-               RETVAL=$?
-               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/git-daemon
-       else
-               msg_already_running git-daemon
+       if [ -f /var/lock/subsys/git-daemon ]; then
+               msg_already_running "git-daemon"
+               return
        fi
+
+       msg_starting "git-daemon"
+       daemon --fork @libdir@/git-core/git-daemon $DAEMON_OPTS
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/git-daemon
 }
 
 stop() {
-       if [ -f /var/lock/subsys/git-daemon ]; then
-               # Stop daemons.
-               msg_stopping git-daemon
-               killproc git-daemon
-               rm -f /var/lock/subsys/git-daemon
-       else
-               msg_not_running git-daemon
+       if [ ! -f /var/lock/subsys/git-daemon ]; then
+               msg_not_running "git-daemon"
+               return
        fi
+
+       # Stop daemons.
+       msg_stopping "git-daemon"
+       killproc git-daemon
+       rm -f /var/lock/subsys/git-daemon
 }
 
 reload() {
-       if [ -f /var/lock/subsys/git-daemon ]; then
-               msg_reloading git-daemon
-               killproc git-daemon -HUP
-               RETVAL=$?
-       else
-               msg_not_running git-daemon
+       if [ ! -f /var/lock/subsys/git-daemon ]; then
+               msg_not_running "git-daemon"
                RETVAL=7
+               return
        fi
+
+       msg_reloading "git-daemon"
+       killproc git-daemon -HUP
+       RETVAL=$?
 }
 
 condrestart() {
-       if [ -f /var/lock/subsys/git-daemon ]; then
-               stop
-               start
-       else
-               msg_not_running git-daemon
+       if [ ! -f /var/lock/subsys/git-daemon ]; then
+               msg_not_running "git-daemon"
                RETVAL=$1
+               return
        fi
+
+       stop
+       start
 }
 
 RETVAL=0
This page took 0.029137 seconds and 4 git commands to generate.