Update nodemgmt-scripts.sh

This commit is contained in:
2019-01-28 16:26:19 -06:00
parent b2c225c81b
commit d27b62a558

View File

@@ -117,10 +117,7 @@ case "$1" in
NCMD="ssh root@${nip}" NCMD="ssh root@${nip}"
fi fi
if [ $(${NCMD} pgrep mysql | wc -l) -gt "0" ]; then
SER_MYSQL="${idsCL[Green]}Running${idsCL[Default]}"
else SER_MYSQL="${idsCL[Red]}Not Running${idsCL[Default]}"
fi
if [ $(${NCMD} pgrep haproxy | wc -l) -gt "0" ]; then if [ $(${NCMD} pgrep haproxy | wc -l) -gt "0" ]; then
SER_HAP="${idsCL[Green]}Running${idsCL[Default]}" SER_HAP="${idsCL[Green]}Running${idsCL[Default]}"
else SER_HAP="${idsCL[Red]}Not Running${idsCL[Default]}" else SER_HAP="${idsCL[Red]}Not Running${idsCL[Default]}"
@@ -144,12 +141,36 @@ case "$1" in
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}" echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
echo -e "Node hostname: ${nip}" echo -e "Node hostname: ${nip}"
echo -e "MySQL: ${SER_MYSQL}" echo -en "MySQL: "
echo -e "NGINX: ${SER_NGINX}" if [ $(${NCMD} pgrep mysql | wc -l) -gt "0" ]; then
echo -e "Gogs: ${SER_GOGS}" echo -e "${idsCL[Green]}Running${idsCL[Default]}"
echo -e "HAProxy: ${SER_HAP}" else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
echo -e "Keepalived: ${SER_KA}" fi
echo -e "MaxScale: ${SER_MS}" echo -en "NGINX: "
if [ $(${NCMD} pgrep nginx | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
echo -en "Gogs: "
if [ $(${NCMD} pgrep gogs | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
echo -en "HAProxy: "
if [ $(${NCMD} pgrep haproxy | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
echo -en "Keepalived: "
if [ $(${NCMD} pgrep keepalived | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
echo -en "MaxScale: "
if [ $(${NCMD} pgrep maxscale | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
nid=`expr $nid + 1` nid=`expr $nid + 1`
done done