From 58bd05be6318793a789fde85c370ca21169165c4 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 18 Oct 2023 13:09:32 -0500 Subject: [PATCH] Update services.inc --- inc/services.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/services.inc b/inc/services.inc index d68e7392..0b3129bc 100755 --- a/inc/services.inc +++ b/inc/services.inc @@ -13,14 +13,14 @@ SINGLE_SERVER_SERVICE_CHECK(){ SENDNOTICE "Node-Balancing Notice" "Starting SingleServer Services on ${NM_NODETYPES[${1^^}]}-Node${local_ip: -1} (${local_ip}), stopping on other Nodes" touch ${NM_TMPFOLDER}/.singleserver fi - if [ ! -f /mnt/web-data/mounted ]; then + if [ "${1^^}" == "WEB" ] && [ ! -f /mnt/web-data/mounted ]; then /bin/mount -a sleep 5s fi if [ -f ${NM_REPL_CHECK_LOC["${1}-data"]}/mounted ]; then for stc in "${!servicestocheck}"; do if [ "$(systemctl is-active ${stc}.service)" != "active" ]; then - echo "$(date) - ${NM_NODETYPES[${1^^}]}-Node${local_ip: -1} - Starting ${stc} on ${local_ip}, stopping on the other Nodes" >> ${NM_LOGFILE} + echo "$(date) - ${NM_NODETYPES[${1^^}]}-Node${local_ip: -1} - Starting ${stc} on ${local_ip}, stopping on the other Nodes ..." >> ${NM_LOGFILE} [ "${stc}" = "pdnsadmin" ] && stc="pdnsadmin.socket pdnsadmin.service" for nip in "${!hosts}"; do @@ -33,6 +33,7 @@ SINGLE_SERVER_SERVICE_CHECK(){ done sleep 3s /bin/systemctl start ${stc} & + echo "$(date) - ${NM_NODETYPES[${1^^}]}-Node${local_ip: -1} - ... Done" >> ${NM_LOGFILE} fi done for docker in "${!dockerstocheck}"; do