SOURCES: git-core.init - added try-restart action (LSB 3.1)
qboosh
qboosh at pld-linux.org
Sun Dec 2 12:18:14 CET 2007
Author: qboosh Date: Sun Dec 2 11:18:14 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- added try-restart action (LSB 3.1)
---- Files affected:
SOURCES:
git-core.init (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/git-core.init
diff -u SOURCES/git-core.init:1.1 SOURCES/git-core.init:1.2
--- SOURCES/git-core.init:1.1 Wed Nov 21 21:25:54 2007
+++ SOURCES/git-core.init Sun Dec 2 12:18:09 2007
@@ -63,6 +63,16 @@
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 @@
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
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/git-core.init?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list