]> git.pld-linux.org Git - packages/git-core.git/commitdiff
- added try-restart action (LSB 3.1)
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 2 Dec 2007 11:18:09 +0000 (11:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    git-core.init -> 1.2

git-core.init

index dd3c1f3a9078a6da1fc55ee834ba7f4f40ed522a..cfd659440a40c2a913d672c6ab4881ecfe857989 100644 (file)
@@ -63,6 +63,16 @@ reload() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/git-daemon ]; then
+               stop
+               start
+       else
+               msg_not_running git-daemon
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -76,20 +86,18 @@ case "$1" in
        stop
        start
        ;;
-  reload)
-       reload
+  try-restart)
+       condrestart 0
        ;;
-# ONLY if program allows reloading without stopping
-# otherwise include force-reload with 'reload'
-  force-reload)
-       reload
+  reload|force-reload)
+       reload
        ;;
   status)
        status git-daemon
        RETVAL=$?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
        exit 3
 esac
 
This page took 0.038548 seconds and 4 git commands to generate.