PSCMD="@PSCMD@"
-BACBIN=@sbindir@
-BACCFG=@sysconfdir@
+# All these are not *really* needed but it makes it
+# easier to "steal" this code for the development
+# environment where they are different.
+#
+BACFDBIN=@sbindir@
+BACFDCFG=@sysconfdir@
+BACSDBIN=@sbindir@
+BACSDCFG=@sysconfdir@
+BACDIRBIN=@sbindir@
+BACDIRCFG=@sysconfdir@
PIDDIR=@piddir@
SUBSYSDIR=@subsysdir@
-DIR_PORT=9101
-FD_PORT=9102
-SD_PORT=9103
+DIR_PORT=@dir_port@
+FD_PORT=@fd_port@
+SD_PORT=@sd_port@
DIR_USER=@dir_user@
DIR_GROUP=@dir_group@
case "$1" in
start)
- [ -x ${BACBIN}/bacula-sd ] && {
+ [ -x ${BACSDBIN}/bacula-sd ] && {
echo "Starting the Storage daemon"
OPTIONS=''
if [ "${SD_USER}" != '' ]; then
OPTIONS="${OPTIONS} -g ${SD_GROUP}"
fi
- ${BACBIN}/bacula-sd $2 ${OPTIONS} -v -c ${BACCFG}/bacula-sd.conf
+ ${BACSDBIN}/bacula-sd $2 ${OPTIONS} -v -c ${BACSDCFG}/bacula-sd.conf
}
- [ -x ${BACBIN}/bacula-fd ] && {
+ [ -x ${BACFDBIN}/bacula-fd ] && {
echo "Starting the File daemon"
OPTIONS=''
if [ "${FD_USER}" != '' ]; then
OPTIONS="${OPTIONS} -g ${FD_GROUP}"
fi
- ${BACBIN}/bacula-fd $2 ${OPTIONS} -v -c ${BACCFG}/bacula-fd.conf
+ ${BACFDBIN}/bacula-fd $2 ${OPTIONS} -v -c ${BACFDCFG}/bacula-fd.conf
}
- [ -x ${BACBIN}/bacula-dir ] && {
+ [ -x ${BACDIRBIN}/bacula-dir ] && {
sleep 2
echo "Starting the Director daemon"
OPTIONS=''
OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
fi
- ${BACBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACCFG}/bacula-dir.conf
+ ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
}
;;
stop)
# Stop the FD first so that SD will fail jobs and update catalog
- [ -x ${BACBIN}/bacula-fd ] && {
+ [ -x ${BACFDBIN}/bacula-fd ] && {
echo "Stopping the File daemon"
- killproc ${BACBIN}/bacula-fd ${FD_PORT}
+ killproc ${BACFDBIN}/bacula-fd ${FD_PORT}
}
- [ -x ${BACBIN}/bacula-sd ] && {
+ [ -x ${BACSDBIN}/bacula-sd ] && {
echo "Stopping the Storage daemon"
- killproc ${BACBIN}/bacula-sd ${SD_PORT}
+ killproc ${BACSDBIN}/bacula-sd ${SD_PORT}
}
- [ -x ${BACBIN}/bacula-dir ] && {
+ [ -x ${BACDIRBIN}/bacula-dir ] && {
echo "Stopping the Director daemon"
- killproc ${BACBIN}/bacula-dir ${DIR_PORT}
+ killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT}
}
echo
;;
;;
status)
- [ -x ${BACBIN}/bacula-sd ] && status ${BACBIN}/bacula-sd ${SD_PORT}
- [ -x ${BACBIN}/bacula-fd ] && status ${BACBIN}/bacula-fd ${FD_PORT}
- [ -x ${BACBIN}/bacula-dir ] && status ${BACBIN}/bacula-dir ${DIR_PORT}
+ [ -x ${BACSDBIN}/bacula-sd ] && status ${BACSDBIN}/bacula-sd ${SD_PORT}
+ [ -x ${BACFDBIN}/bacula-fd ] && status ${BACFDBIN}/bacula-fd ${FD_PORT}
+ [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT}
;;
*)