Skip to content

Commit

Permalink
Merge pull request #653 from Alignak-monitoring/alignak-scripts
Browse files Browse the repository at this point in the history
Previous review comments
  • Loading branch information
David Durieux authored Dec 19, 2016
2 parents fd6cd99 + be97e82 commit a99ffde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions bin/default/alignak.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 3 additions & 6 deletions bin/init.d/alignak
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a99ffde

Please sign in to comment.