]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/suse/bacula-dir.in
Fix dist detection.
[bacula/bacula] / bacula / platforms / suse / bacula-dir.in
index d192063b68cbcd4b6921e89e02dc918a9cd81d76..c4d17bb90395cc04f926ddb0fe8df47c10a78bd9 100755 (executable)
@@ -1,16 +1,29 @@
 #! /bin/sh
 #
-# This file is reported not to work by Alan Brown 21Feb04
-#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula Director daemon
 #
-# chkconfig: 2345 90 99
+# chkconfig: 2345 90 9
 # description: It comes by night and sucks the vital essence from your computers.
 #
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+# Modified to work on SuSE 1/31/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+# Added rc.status functions 3/13/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+# Added LSB init info 10/14/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 #
+### BEGIN INIT INFO
+# Provides:                    bacula-dir
+# Required-Start:              $local_fs $network @DB_NAME@
+# Required-Stop:               $local_fs $network @DB_NAME@
+# Default-Start:               3 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   bacula director
+# Description:                 Bacula network backup system director daemon
+### END INIT INFO
 
+# source process status functions
+# this gives us funtion rc_status -v to tell us if we succeed or fail
+. /etc/rc.status
 
 RETVAL=0
 case "$1" in
@@ -18,6 +31,7 @@ case "$1" in
        echo -n "Starting the Bacula Director: "
        /sbin/startproc @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
        RETVAL=$?
+       rc_status -v
        echo
        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
        ;;
@@ -25,6 +39,7 @@ case "$1" in
        echo -n "Stopping the Director daemon: "
        /sbin/killproc @sbindir@/bacula-dir
        RETVAL=$?
+       rc_status -v
        echo
        [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir
        ;;
@@ -35,6 +50,7 @@ case "$1" in
        ;;
     status)
        /sbin/checkproc @sbindir@/bacula-dir
+       rc_status -v
        ;;
     *)
        echo "Usage: $0 {start|stop|restart|status}"