]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/suse/bacula-fd.in
Backport copyright changes
[bacula/bacula] / bacula / platforms / suse / bacula-fd.in
index 5245ecc0d3fd401624d95085e17eee4c9888d1c7..6bfdf3371661b47e3aed8e1037de7509bc575eaa 100755 (executable)
@@ -1,21 +1,40 @@
 #! /bin/sh
 #
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
 # bacula       This shell script takes care of starting and stopping
 #             the bacula File daemon.
 #
-# chkconfig: 2345 90 99
-# description: It comes by night and sucks the vital essence from your computers.
+# chkconfig: 2345 90 9
+# description: The Leading Open Source Backup Solution.
 #
 #  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-fd
+# Required-Start:              $local_fs $network
+# Required-Stop:               $local_fs $network
+# Default-Start:               3 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   bacula file daemon
+# Description:                 Bacula network backup system file 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
     start)
        echo -n "Starting the Bacula File daemon: "
        /sbin/startproc @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
        RETVAL=$?
+       rc_status -v
        echo
        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
        ;;
@@ -23,6 +42,7 @@ case "$1" in
        echo -n "Stopping the Bacula File daemon: "
        /sbin/killproc @sbindir@/bacula-fd
        RETVAL=$?
+       rc_status -v
        echo
        [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd
        ;;
@@ -30,13 +50,16 @@ case "$1" in
        $0 stop
        sleep 5
        $0 start
+       RETVAL=$?
        ;;
     status)
        /sbin/checkproc @sbindir@/bacula-fd
+       RETVAL=$?
+       rc_status -v
        ;;
     *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1
        ;;
 esac
-exit 0
+exit $RETVAL