Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 21:40:43 -06:00
parent 919caffcb9
commit ab3583d542

View File

@@ -197,7 +197,6 @@ STATUS-CHECK(){
if [ -z ${LOCAL_SERVICES+x} ] || [ "${1}" = "all" ]; then
nid=1
for nip in "${NODE_HOSTS[@]}"; do
echo "${nip}"
checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then
if [ -f ${FOLDER}/${nip}.down ]; then
@@ -208,6 +207,7 @@ STATUS-CHECK(){
else NCMD="ssh root@${nip}"
fi
for srvc in "${NODE_SERVICES[@]}"; do
echo "${nip} - ${srvc}"
if [ "$(${NCMD} systemctl is-active ${srvc})" != "active" ]; then
if [ ! -f ${FOLDER}/${nip}-${srvc}.down ]; then
echo "${NM_SERVICES[${srvc}]} is down" | mail -s "iDS-Node${nid}-${nip}" ${STATUS_CHECK_EMAIL}