]> git.pld-linux.org Git - packages/bacula.git/blobdiff - bacula-dir.init
- setup $HOME in make_catalog_backup, so you could store passwords in file rather...
[packages/bacula.git] / bacula-dir.init
index a7517ed6b7ab0f854dced7695587a99bb45979a3..16e0654099e63bb800a2ac03ba56107511837fa2 100644 (file)
@@ -37,29 +37,45 @@ stop() {
        # Stop daemons.
        msg_stopping "Bacula Director"
        killproc /usr/sbin/bacula-dir
-       RETVAL=$?
        rm -f /var/lock/subsys/bacula-dir
 }
 
+condrestart() {
+       if [ ! -f /var/lock/subsys/bacula-dir ]; then
+               msg_not_running  "Bacula Director"
+               RETVAL=$1
+               return
+       fi
+
+       stop
+       start
+}
+
 RETVAL=0
 case "$1" in
-start)
+  start)
        start
        ;;
-stop)
+  stop)
        stop
        ;;
-restart)
+  restart)
        stop
        sleep 5
        start
        ;;
-status)
-       status /usr/sbin/bacula-dir
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
+  status)
+       status bacula-dir
        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.048143 seconds and 4 git commands to generate.