X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fscripts%2Fbacula-ctl-dir.in;h=0eb28d9a72d1ebe126f540bbc75f7809aa40ded5;hb=3b541b56cdf05471ca8caa7c1ff895c979a900e2;hp=4282eb7bdf7bdb1a0f3ef3ed7dcc2228e60d5e40;hpb=c61c6525d92d0324770fa76f2a802f55235ac752;p=bacula%2Fbacula diff --git a/bacula/scripts/bacula-ctl-dir.in b/bacula/scripts/bacula-ctl-dir.in index 4282eb7bdf..0eb28d9a72 100644 --- a/bacula/scripts/bacula-ctl-dir.in +++ b/bacula/scripts/bacula-ctl-dir.in @@ -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,6 @@ fi case "$1" in start) [ -x ${BACDIRBIN}/bacula-dir ] && { - sleep 2 echo "Starting the $Bacula Director daemon" OPTIONS='' if [ "${DIR_USER}" != '' ]; then @@ -213,6 +213,7 @@ case "$1" in else ${BACDIRBIN}/bacula-dir $2 $3 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf fi + sleep 1 } ;;