]> git.pld-linux.org Git - packages/apache-tomcat.git/commitdiff
- add try-restart apache-tomcat-5_5_26-0_1
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 3 Oct 2008 18:55:06 +0000 (18:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache-tomcat.init -> 1.10

apache-tomcat.init

index ed8eccf668c43501e5edd1c085ab1088f8c6d8b7..f09f91e1db28f1fd28289eba7f3578e069822b03 100644 (file)
@@ -59,6 +59,16 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/tomcat ]; then
+               stop
+               start
+       else
+               msg_not_running tomcat
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -68,16 +78,22 @@ case "$1" in
   stop)
        stop
        ;;
-  restart|force-reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        echo "Not supported (yet?)"
        RETVAL=0
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
This page took 0.042399 seconds and 4 git commands to generate.