From 67b3df4890882b1c61eff1dc5fa60c8008c0a7ce Mon Sep 17 00:00:00 2001 From: rafael Date: Tue, 27 Jun 2023 16:34:21 +0200 Subject: [PATCH 1/2] 11663 use variable instead of path for multiple instance check conf exepction --- pandora_server/util/pandora_server | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_server/util/pandora_server b/pandora_server/util/pandora_server index 1e612c968f..b609b66e08 100755 --- a/pandora_server/util/pandora_server +++ b/pandora_server/util/pandora_server @@ -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 From 0bd3c1525edd2fc306ca883031e649102a28e6a5 Mon Sep 17 00:00:00 2001 From: rafael Date: Tue, 27 Jun 2023 16:40:41 +0200 Subject: [PATCH 2/2] 11663 fix typo --- pandora_server/util/pandora_server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/util/pandora_server b/pandora_server/util/pandora_server index b609b66e08..7b83868abe 100755 --- a/pandora_server/util/pandora_server +++ b/pandora_server/util/pandora_server @@ -40,7 +40,7 @@ export PID_DIR=/var/run declare -A SERVERS_NAMES # Environment variables -if [ -f /etc/pandora/pandora_server.env ]; then +if [ -f $PANDORA_ENV ]; then source $PANDORA_ENV fi if [[ -z ${PANDORA_RB_PRODUCT_NAME} ]]; then