Update services.inc

This commit is contained in:
2023-10-18 13:09:32 -05:00
parent b5be3d1685
commit 58bd05be63

View File

@@ -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