Author: glen                         Date: Mon May 12 22:36:19 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- implement properly (according to template.init from rc-scripts)

---- Files affected:
SOURCES:
   amavis-stats.init (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/amavis-stats.init
diff -u SOURCES/amavis-stats.init:1.3 SOURCES/amavis-stats.init:1.4
--- SOURCES/amavis-stats.init:1.3       Tue May 13 00:33:24 2008
+++ SOURCES/amavis-stats.init   Tue May 13 00:36:13 2008
@@ -47,6 +47,16 @@
        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 @@
   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
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/amavis-stats.init?r1=1.3&r2=1.4&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to