2 # Copyright 1999-2004 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # Modified for user/group information
5 # 24 Oct 2004 D. Scott Barninger <barninger at fairfieldcomputers dot com
21 # A client would only need to run the file daemon, so if thats the
22 # case for this machine just comment the other two out below here...
24 ebegin "Starting bacula storage daemon"
26 if [ "${SD_USER}" != '' ]; then
27 OPTIONS="${OPTIONS} -u ${SD_USER}"
30 if [ "${SD_GROUP}" != '' ]; then
31 OPTIONS="${OPTIONS} -g ${SD_GROUP}"
33 start-stop-daemon --start --quiet --exec @sbindir@/bacula-sd \
34 -- ${OPTIONS} -c @sysconfdir@/bacula-sd.conf
37 ebegin "Starting bacula file daemon"
39 if [ "${FD_USER}" != '' ]; then
40 OPTIONS="${OPTIONS} -u ${FD_USER}"
43 if [ "${FD_GROUP}" != '' ]; then
44 OPTIONS="${OPTIONS} -g ${FD_GROUP}"
46 start-stop-daemon --start --quiet --exec @sbindir@/bacula-fd \
47 -- ${OPTIONS} -c @sysconfdir@/bacula-fd.conf
48 result=$(( $result + $? ))
51 ebegin "Starting bacula director"
53 if [ "${DIR_USER}" != '' ]; then
54 OPTIONS="${OPTIONS} -u ${DIR_USER}"
57 if [ "${DIR_GROUP}" != '' ]; then
58 OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
60 start-stop-daemon --start --quiet --exec @sbindir@/bacula-dir \
61 -- ${OPTIONS} -c @sysconfdir@/bacula-dir.conf
62 result=$(( $result + $? ))
67 # The default port numbers appear in the pidfile paths below.
68 # Might wanna programmatically grab them from the config files
71 ebegin "Stopping bacula file daemon"
72 start-stop-daemon --stop --quiet --pidfile /var/run/bacula-fd.9102.pid
74 ebegin "Stopping bacula storage daemon"
75 start-stop-daemon --stop --quiet --pidfile /var/run/bacula-sd.9103.pid
76 result=$(( $result + $? ))
77 ebegin "Stopping bacula director"
78 start-stop-daemon --stop --quiet --pidfile /var/run/bacula-dir.9101.pid
79 result=$(( $result + $? ))
84 ebegin "Testing bacula storage daemon configuration"
85 @sbindir@/bacula-sd -t -c @sysconfdir@/bacula-sd.conf
87 ebegin "Testing bacula file daemon configuration"
88 @sbindir@/bacula-fd -t -c @sysconfdir@/bacula-fd.conf
89 result=$(( $result + $? ))
90 ebegin "Testing bacula director configuration"
91 @sbindir@/bacula-dir -t -c @sysconfdir@/bacula-dir.conf
92 result=$(( $result + $? ))