]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/slackware/rc.bacula-dir.in
First stab at a simple script to dump the content of the complete Ingres bacula datab...
[bacula/bacula] / bacula / platforms / slackware / rc.bacula-dir.in
1 #! /bin/sh
2 #
3 # bacula       This shell script takes care of starting and stopping
4 #              the bacula Director daemon
5 #
6 # chkconfig: 2345 92 99
7 # description: The Leading Open Source Backup Solution.
8 #
9 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
10 #
11
12 # Source function library
13 . /etc/rc.d/functions.bacula
14
15 case "$1" in
16     start)
17         [ -x ${BACDIRBIN}/bacula-dir ] && { 
18             sleep 2
19             echo -n "Starting the Director daemon: "
20             OPTIONS=''
21             if [ "${DIR_USER}" != '' ]; then
22                OPTIONS="${OPTIONS} -u ${DIR_USER}"
23             fi
24
25             if [ "${DIR_GROUP}" != '' ]; then
26                OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
27             fi
28
29             ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
30             echo Done.
31         }
32         ;;
33     stop)
34         [ -x ${BACDIRBIN}/bacula-dir ] && {
35             echo -n "Stopping the Director daemon: "
36             killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT}
37             echo Done.
38         }
39         ;;
40     restart)
41         $0 stop
42         sleep 5
43         $0 start
44         ;;
45     status)
46         [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT}
47         ;;
48     *)
49         echo "Usage: $0 {start|stop|restart|status}"
50         exit 1
51         ;;
52 esac
53 exit 0