11663 use variable instead of path for multiple instance check conf exepction

This commit is contained in:
rafael 2023-06-27 16:34:21 +02:00
parent 960ede0e15
commit 67b3df4890
1 changed files with 3 additions and 2 deletions

View File

@ -35,12 +35,13 @@ export PANDORA_HOME="/etc/pandora/pandora_server.conf"
export PANDORA_HOME_EXTRA="/etc/pandora/conf.d"
export PANDORA_DAEMON=/usr/bin/pandora_server
export PANDORA_HA=/usr/bin/pandora_ha
export PANDORA_ENV=/etc/pandora/pandora_server.env
export PID_DIR=/var/run
declare -A SERVERS_NAMES
# Environment variables
if [ -f /etc/pandora/pandora_server.env ]; then
source /etc/pandora/pandora_server.env
source $PANDORA_ENV
fi
if [[ -z ${PANDORA_RB_PRODUCT_NAME} ]]; then
PANDORA_RB_PRODUCT_NAME="Pandora FMS"
@ -270,7 +271,7 @@ case "$1" in
start-server)
_count=0
for key in ${!SERVERS_NAMES[@]}; do
[[ $key != "/etc/pandora/pandora_server.conf" ]] && check_extra_confs $key
[[ $key != $PANDORA_HOME ]] && check_extra_confs $key
unset SEC_PID
SEC_PID=$(pidof_secondary_server $key)
if [ ! -z "$SEC_PID" ] ; then