]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/scripts/bacula.in
Move btraceback.gdb to scriptdir on install + hammer DB Version update
[bacula/bacula] / bacula / scripts / bacula.in
index 1fbd1a98eef87a7f0033588034b5b18f75320bc2..0ca89a1d68e46198455749d07786c3eddd4eade8 100755 (executable)
 
 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@
@@ -181,7 +189,7 @@ failure() {
 
 case "$1" in
     start)
-       [ -x ${BACBIN}/bacula-sd ] && {
+       [ -x ${BACSDBIN}/bacula-sd ] && {
          echo "Starting the Storage daemon"
          OPTIONS=''
          if [ "${SD_USER}" != '' ]; then
@@ -192,10 +200,10 @@ case "$1" in
             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
@@ -206,10 +214,10 @@ case "$1" in
             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=''
@@ -221,25 +229,25 @@ case "$1" in
             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
        ;;
@@ -251,9 +259,9 @@ case "$1" in
        ;;
 
     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}
        ;;
 
     *)