]> git.pld-linux.org Git - packages/cpqarrayd.git/blobdiff - cpqarrayd.init
- force-reload is not supposed to start service if it is not running
[packages/cpqarrayd.git] / cpqarrayd.init
index e63d8a0510a13c68e4d02699359ab01959757e21..eafdc0856ae3166fa647cd281c2ccd657ec23cb6 100644 (file)
@@ -43,6 +43,18 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/cpqarrayd ]; then
+               stop
+               start
+       else
+               if [ $1 -ne 0 ]; then
+                       msg_not_running cpqarrayd
+               fi
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -56,12 +68,18 @@ restart|force-reload)
        stop
        start
        ;;
+try-restart)
+       condrestart 0
+       ;;
+force-reload)
+       condrestart 7
+       ;;
 status)
        status cpqarrayd
        RETVAL=$?
        ;;
 *)
-       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.028688 seconds and 4 git commands to generate.