Update services.inc
This commit is contained in:
@@ -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"
|
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
|
touch ${NM_TMPFOLDER}/.singleserver
|
||||||
fi
|
fi
|
||||||
if [ ! -f /mnt/web-data/mounted ]; then
|
if [ "${1^^}" == "WEB" ] && [ ! -f /mnt/web-data/mounted ]; then
|
||||||
/bin/mount -a
|
/bin/mount -a
|
||||||
sleep 5s
|
sleep 5s
|
||||||
fi
|
fi
|
||||||
if [ -f ${NM_REPL_CHECK_LOC["${1}-data"]}/mounted ]; then
|
if [ -f ${NM_REPL_CHECK_LOC["${1}-data"]}/mounted ]; then
|
||||||
for stc in "${!servicestocheck}"; do
|
for stc in "${!servicestocheck}"; do
|
||||||
if [ "$(systemctl is-active ${stc}.service)" != "active" ]; then
|
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"
|
[ "${stc}" = "pdnsadmin" ] && stc="pdnsadmin.socket pdnsadmin.service"
|
||||||
for nip in "${!hosts}"; do
|
for nip in "${!hosts}"; do
|
||||||
@@ -33,6 +33,7 @@ SINGLE_SERVER_SERVICE_CHECK(){
|
|||||||
done
|
done
|
||||||
sleep 3s
|
sleep 3s
|
||||||
/bin/systemctl start ${stc} &
|
/bin/systemctl start ${stc} &
|
||||||
|
echo "$(date) - ${NM_NODETYPES[${1^^}]}-Node${local_ip: -1} - ... Done" >> ${NM_LOGFILE}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for docker in "${!dockerstocheck}"; do
|
for docker in "${!dockerstocheck}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user