From 9e8d036c5f5e7c6f1e568f38190bb6ac359aeaf5 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 29 Nov 2023 10:11:50 -0600 Subject: [PATCH] Update services.inc --- inc/services.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/services.inc b/inc/services.inc index 5c6424f4..c5a2ed8e 100755 --- a/inc/services.inc +++ b/inc/services.inc @@ -8,7 +8,6 @@ SINGLE_SERVER_SERVICE_CHECK(){ [ "${2^^}" == "START" ] && rm -f ${NM_TMPFOLDER}/.singleserver if [[ "$(declare -p ${1^^}_SINGLESRVR_SERVICES)" =~ "declare -a" ]] || [ "${!dockerstocheck}" != "" ]; then - echo checking services if [[ $(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | awk '/inet/ {print $2}' | cut -d'/' -f1) == *${NM_SINGLESRVR_IP[${1^^}]}* ]]; then if [ ! -f ${NM_TMPFOLDER}/.singleserver ]; then SENDNOTICE "Node-Balancing Notice" "Starting SingleServer Services on ${NM_HOSTNAMES[${RUN_NODE_IP}]} (${RUN_NODE_IP}), stopping on other Nodes" @@ -24,6 +23,7 @@ SINGLE_SERVER_SERVICE_CHECK(){ fi if [ "${gofor}" == "true" ]; then for stc in "${!servicestocheck}"; do + echo "HERE: $stc" if [ "$(systemctl is-active ${stc}.service)" != "active" ]; then echo "$(date +%Y-%m-%d-%H-%M-%S) - ${NM_HOSTNAMES[${RUN_NODE_IP}]} - Starting ${stc} on ${RUN_NODE_IP}, stopping on the other Nodes ..." >> ${NM_LOGFILE}