]> git.pld-linux.org Git - packages/apache-tomcat.git/blobdiff - apache-tomcat.init
- add try-restart
[packages/apache-tomcat.git] / 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.029321 seconds and 4 git commands to generate.