Update nodemgmt-scripts.sh
This commit is contained in:
@@ -739,9 +739,9 @@ SINGLE_SERVER_SERVICE_CHECK(){
|
|||||||
/bin/mount -a
|
/bin/mount -a
|
||||||
sleep 5s
|
sleep 5s
|
||||||
fi
|
fi
|
||||||
if [ -f /mnt/web-data/mounted ]; then
|
if [ -f ${REPL_CHECKS["${1}-data"]}/mounted ]; then
|
||||||
|
echo mounted
|
||||||
for stc in "${!servicestocheck}"; do
|
for stc in "${!servicestocheck}"; do
|
||||||
echo "stc: $stc"
|
|
||||||
if [ "$(systemctl is-active ${stc}.service)" != "active" ]; then
|
if [ "$(systemctl is-active ${stc}.service)" != "active" ]; then
|
||||||
SENDNOTICE "Node-Balancing Notice" "Starting ${stc} on ${NM_NODETYPES["WEB"]}-Node${local_ip: -1} (${local_ip}), stopping on the other Nodes"
|
SENDNOTICE "Node-Balancing Notice" "Starting ${stc} on ${NM_NODETYPES["WEB"]}-Node${local_ip: -1} (${local_ip}), stopping on the other Nodes"
|
||||||
echo "$(date) - ${NM_NODETYPES["WEB"]}-Node${local_ip: -1} - Starting ${stc} on ${local_ip}, stopping on the other Nodes" >> ${LOGFILE}
|
echo "$(date) - ${NM_NODETYPES["WEB"]}-Node${local_ip: -1} - Starting ${stc} on ${local_ip}, stopping on the other Nodes" >> ${LOGFILE}
|
||||||
@@ -757,7 +757,6 @@ SINGLE_SERVER_SERVICE_CHECK(){
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for docker in "${!dockerstocheck}"; do
|
for docker in "${!dockerstocheck}"; do
|
||||||
echo "docker: $docker"
|
|
||||||
for nip in "${!hosts}"; do
|
for nip in "${!hosts}"; do
|
||||||
if [[ "${local_ip}" = *"${nip}"* ]]; then
|
if [[ "${local_ip}" = *"${nip}"* ]]; then
|
||||||
[ ! "$(/usr/bin/docker ps -q -f name=${docker})" ] && /usr/bin/docker start ${docker} & >/dev/null 2>&1
|
[ ! "$(/usr/bin/docker ps -q -f name=${docker})" ] && /usr/bin/docker start ${docker} & >/dev/null 2>&1
|
||||||
@@ -770,6 +769,7 @@ SINGLE_SERVER_SERVICE_CHECK(){
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
else echo not mounted
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user