X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fscripts%2Fbacula-ctl-dir.in;h=693e59aba9468fd6afe4cfad04f51ca04d2de1ee;hb=01448b9cc8baff2e1942aaa59b71c36ee1cf070c;hp=37d22aff86c52e189545d9528fa53b0ca7ea8bd4;hpb=a16ef40c820faeb2ab23edacf5f01a9639f60050;p=bacula%2Fbacula diff --git a/bacula/scripts/bacula-ctl-dir.in b/bacula/scripts/bacula-ctl-dir.in index 37d22aff86..693e59aba9 100644 --- a/bacula/scripts/bacula-ctl-dir.in +++ b/bacula/scripts/bacula-ctl-dir.in @@ -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} } ;;