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}"
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
SER_HAP="${idsCL[Green]}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 "Node hostname: ${nip}"
echo -e "MySQL: ${SER_MYSQL}"
echo -e "NGINX: ${SER_NGINX}"
echo -e "Gogs: ${SER_GOGS}"
echo -e "HAProxy: ${SER_HAP}"
echo -e "Keepalived: ${SER_KA}"
echo -e "MaxScale: ${SER_MS}"
echo -en "MySQL: "
if [ $(${NCMD} pgrep mysql | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
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`
done