diff --git a/bin/default/alignak.in b/bin/default/alignak.in index 970296594..ad145c010 100755 --- a/bin/default/alignak.in +++ b/bin/default/alignak.in @@ -65,11 +65,12 @@ ARBITERCFG="$ETC/daemons/arbiterd.ini" # location of the alignak configuration file # Now look if some required variables are pre defined: -if ! test "$ALIGNAKCFG" -then +if [ -z "$ALIGNAKCFG" ]; then # Please update $ETC$ instead of this one. ALIGNAKCFG="$ETC/alignak.cfg" fi +echo "Alignak main configuration file is: $ALIGNAKCFG" +echo "---" # We got 2 configs because tools like Centreon don't generate all # configuration (only the alignak.cfg part) diff --git a/bin/init.d/alignak b/bin/init.d/alignak index 7939f27d8..f964aa240 100755 --- a/bin/init.d/alignak +++ b/bin/init.d/alignak @@ -141,8 +141,7 @@ else fi # Now look if some required variables are pre defined: -if ! test "$ALIGNAKCFG" -then +if [ -z "$ALIGNAKCFG" ]; then ALIGNAKCFG="$ETC/alignak.cfg" fi @@ -276,8 +275,7 @@ do_start() { output=$($modfilepath -d -c "${modinifile}" $DEBUGCMD 2>&1) rc=$? else - if ! test "$ALIGNAKSPECIFICCFG" - then + if [ -z "$ALIGNAKSPECIFICCFG" ]; then output=$($modfilepath -d -c "${modinifile}" -a "$ALIGNAKCFG" $DEBUGCMD 2>&1) else output=$($modfilepath -d -c "${modinifile}" -a "$ALIGNAKCFG" -a "$ALIGNAKSPECIFICCFG" $DEBUGCMD 2>&1) @@ -369,8 +367,7 @@ do_check() { modINI=$(echo "$"${mod}CFG | tr '[:lower:]' '[:upper:]') modinifile=$(eval echo ${modINI}) - if ! test "$ALIGNAKSPECIFICCFG" - then + if [ -z "$ALIGNAKSPECIFICCFG" ]; then $BIN/alignak-arbiter -V -c "${modinifile}" -a "$ALIGNAKCFG" $DEBUGCMD 2>&1 else $BIN/alignak-arbiter -V -c "${modinifile}" -a "$ALIGNAKCFG" -a "$ALIGNAKSPECIFICCFG" $DEBUGCMD 2>&1