]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/scripts/bacula-ctl-fd.in
Fix ActionOnPurge with a relabel command
[bacula/bacula] / bacula / scripts / bacula-ctl-fd.in
index f3552c32d1cc69221ecbabd5804b89014a968633..538c3a5398feff642b1cfbedc0d71fe275b8de25 100644 (file)
@@ -31,7 +31,7 @@ FD_PORT=@fd_port@
 
 FD_USER=@fd_user@
 FD_GROUP=@fd_group@
-
+Bacula="@BACULA@"
 PIDOF=@PIDOF@  
 
 # A function to stop a program.
@@ -128,7 +128,8 @@ pidofproc() {
    fi
 
    # Finally try to extract it from ps
-   ${PSCMD} | grep $1 | ${AWK} '{ print $1 }' | tr '\n' ' '
+   pid=`${PSCMD} | grep $1 | ${AWK} '{ print $1 }' | tr '\n' ' '`
+   echo $pid
    return 0
 }
 
@@ -197,7 +198,7 @@ fi
 case "$1" in
    start)
       [ -x ${BACFDBIN}/bacula-fd ] && {
-        echo "Starting the Bacula File daemon"
+        echo "Starting the $Bacula File daemon"
         OPTIONS=''
         if [ "${FD_USER}" != '' ]; then
            OPTIONS="${OPTIONS} -u ${FD_USER}"
@@ -207,14 +208,14 @@ case "$1" in
            OPTIONS="${OPTIONS} -g ${FD_GROUP}"
         fi
 
-        ${BACFDBIN}/bacula-fd $2 ${OPTIONS} -v -c ${BACFDCFG}/bacula-fd.conf
+        ${BACFDBIN}/bacula-fd $2 $3 ${OPTIONS} -v -c ${BACFDCFG}/bacula-fd.conf
       }
       ;;
 
    stop)
       # Stop the FD first so that SD will fail jobs and update catalog
       [ -x ${BACFDBIN}/bacula-fd ] && {
-        echo "Stopping the Bacula File daemon"
+        echo "Stopping the $Bacula File daemon"
         killproc ${BACFDBIN}/bacula-fd ${FD_PORT}
       }
       ;;
@@ -226,7 +227,7 @@ case "$1" in
       ;;
 
    status)
-      [ -x ${BACFDBIN}/bacula-fd   ] && status ${BACFDBIN}/bacula-fd  ${FD_PORT}
+      [ -x ${BACFDBIN}/bacula-fd ] && status ${BACFDBIN}/bacula-fd  ${FD_PORT}
       ;;
 
    *)