Update services.inc

This commit is contained in:
2025-01-12 18:38:35 -06:00
parent 21b4e662b6
commit 8c7e7060c0

View File

@@ -14,8 +14,8 @@ SINGLE_SERVER_SERVICE_CHECK(){
if [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.singleserver.${1^^}.primary)) -ge 900 ]; then
if [ ! -f ${NM_TMPFOLDER}/.singleserver.${1^^}.primary ]; then
touch ${NM_TMPFOLDER}/.singleserver.${1^^}.primary
SENDNOTICE "'${NM_NODETYPES[${1^^}]}' Node Switch" "Starting SingleServer Services/Dockers for '${NM_NODETYPES[${1^^}]}' on ${NM_HOSTNAMES[${RUN_NODE_IP}]} (${RUN_NODE_IP}), stopping on other Nodes"
echo "$(date +%Y-%m-%d-%H-%M-%S) - ${NM_HOSTNAMES[${RUN_NODE_IP}]} - Starting SingleServer Services/Dockers on ${NM_HOSTNAMES[${RUN_NODE_IP}]} (${RUN_NODE_IP}), stopping on the other Nodes ..." >> ${NM_LOGFILE}
SENDNOTICE "'${NM_NODETYPES[${1^^}]}' Node Switch" "Starting SingleServer for '${NM_NODETYPES[${1^^}]}' on ${NM_HOSTNAMES[${RUN_NODE_IP}]} (${RUN_NODE_IP}), stopping on other Nodes"
echo "$(date +%Y-%m-%d-%H-%M-%S) - ${NM_HOSTNAMES[${RUN_NODE_IP}]} - Starting SingleServer for '${NM_NODETYPES[${1^^}]}' on ${NM_HOSTNAMES[${RUN_NODE_IP}]} (${RUN_NODE_IP}), stopping on the other Nodes ..." >> ${NM_LOGFILE}
for stc in "${!servicestocheck}"; do
[ "${stc}" = "pdnsadmin" ] && stc="pdnsadmin.service pdnsadmin.socket"
for nip in "${!hosts}"; do