Update services.inc

This commit is contained in:
2023-11-29 10:13:08 -06:00
parent 0fa221b5f8
commit c1864e7b47

View File

@@ -23,7 +23,7 @@ SINGLE_SERVER_SERVICE_CHECK(){
fi
if [ "${gofor}" == "true" ]; then
for stc in "${!servicestocheck}"; do
echo "HERE: $stc"
echo "SERVICE: $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}
@@ -42,6 +42,7 @@ SINGLE_SERVER_SERVICE_CHECK(){
fi
done
for docker in "${!dockerstocheck}"; do
echo "docker: $docker"
for nip in "${!hosts}"; do
if [[ "${RUN_NODE_IP}" = *"${nip}"* ]]; then
if [ "docker ps -a | grep ${docker})" ]; then