This commit is contained in:
2019-01-29 23:00:48 -06:00
parent 3b8aa630cf
commit 9750a1020f
2 changed files with 15 additions and 2 deletions

View File

@@ -96,6 +96,20 @@ case "$1" in
status)
echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
if [ ! -z ${LOCAL_SERVICES+x} ]; then
lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
echo -e "Node: ${idsST[Bold]}${idsCL[LightCyan]}${hostname} (${lip})${idsST[Reset]}${idsCL[LightCyan]} ${LH}${idsCL[Default]}"
for srvc in "${LOCAL_SERVICES[@]}"
do
echo -en "${NM_SERVICES[${srvc}]} "
if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
fi
done
fi
nid=1
for nip in "${NODE_HOSTS[@]}"
do
@@ -105,7 +119,6 @@ case "$1" in
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
echo -e "Node: ${idsST[Bold]}${idsCL[LightCyan]}iDS-Node${nid} (${nip})${idsST[Reset]}${idsCL[LightCyan]} ${LH}${idsCL[Default]}"
for srvc in "${NODE_SERVICES[@]}"
do
echo -en "${NM_SERVICES[${srvc}]} "

2
run.sh
View File

@@ -10,7 +10,7 @@ declare -A SERVICES
if [ "$1" != "service" ] && [ "$1" != "status-check" ]; then
if [ "$1" != "status" ] && if [ -z ${LOCAL_SERVICES+x} ]; then
if [ "$1" != "status" ]; then
echo ""
echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"