]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/scripts/bacula-ctl-dir.in
kes Prepare to add JS_Warnings termination status.
[bacula/bacula] / bacula / scripts / bacula-ctl-dir.in
index 37d22aff86c52e189545d9528fa53b0ca7ea8bd4..693e59aba9468fd6afe4cfad04f51ca04d2de1ee 100644 (file)
@@ -31,7 +31,7 @@ DIR_PORT=@dir_port@
 
 DIR_USER=@dir_user@
 DIR_GROUP=@dir_group@
-
+Bacula="@BACULA@"
 PIDOF=@PIDOF@  
 
 # A function to stop a program.
@@ -198,7 +198,7 @@ case "$1" in
    start)
       [ -x ${BACDIRBIN}/bacula-dir ] && { 
          sleep 2
-         echo "Starting the Bacula Director daemon"
+         echo "Starting the $Bacula Director daemon"
         OPTIONS=''
         if [ "${DIR_USER}" != '' ]; then
            OPTIONS="${OPTIONS} -u ${DIR_USER}"
@@ -208,13 +208,17 @@ case "$1" in
            OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
         fi
 
-        ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
+        if [ "x${VALGRIND}" = "x1" ]; then
+           valgrind --leak-check=full ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
+        else
+           ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
+        fi
       }
       ;;
 
    stop)
       [ -x ${BACDIRBIN}/bacula-dir ] && {
-        echo "Stopping the Bacula Director daemon"
+        echo "Stopping the $Bacula Director daemon"
         killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT}
       }
       ;;