]> git.pld-linux.org Git - packages/bacula.git/blobdiff - bacula-sd.init
rel 2
[packages/bacula.git] / bacula-sd.init
index 23e732dedcad4293d5e9dfe015a6a2648510044b..52616b6d9bf22609da682b0e24ffd6de91f99543 100644 (file)
@@ -37,28 +37,44 @@ stop() {
        # Stop daemons.
        msg_stopping "Bacula Storage"
        killproc /usr/sbin/bacula-sd
-       RETVAL=$?
        rm -f /var/lock/subsys/bacula-sd
 }
 
+condrestart() {
+       if [ ! -f /var/lock/subsys/bacula-sd ]; then
+               msg_not_running "Bacula Storage"
+               RETVAL=$1
+               return
+       fi
+
+       stop
+       start
+}
+
 case "$1" in
-start)
+  start)
        start
        ;;
-stop)
+  stop)
        stop
        ;;
-restart)
+  restart)
        stop
        sleep 5
        start
        ;;
-status)
-       status /usr/sbin/bacula-sd
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
+  status)
+       status bacula-sd
        RETVAL=$?
        ;;
 *)
-       msg_usage "$0 {start|stop|restart|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
        ;;
 esac
This page took 0.038581 seconds and 4 git commands to generate.