]> git.pld-linux.org Git - packages/amavis-stats.git/commitdiff
- implement properly (according to template.init from rc-scripts)
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 12 May 2008 22:36:13 +0000 (22:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    amavis-stats.init -> 1.4

amavis-stats.init

index c0d8aa5ec3cc80fff696c87e54ea4b8b9a9fcc4d..fd58d716bb06b567cda5c2fb85da7a1588140055 100644 (file)
@@ -47,6 +47,16 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/amavis-stats ]; then
+               stop
+               start
+       else
+               msg_not_running "Amavis Stats"
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -56,16 +66,22 @@ case "$1" in
   stop)
        stop
        ;;
-  restart|reload|force-restart|force-reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        status amavis-stats
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
This page took 0.078918 seconds and 4 git commands to generate.