Update nodemgmt-scripts.sh
This commit is contained in:
@@ -99,10 +99,11 @@ case "$1" in
|
|||||||
if [ ! -z ${LOCAL_SERVICES+x} ]; then
|
if [ ! -z ${LOCAL_SERVICES+x} ]; then
|
||||||
lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
|
lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
|
||||||
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
|
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
|
||||||
echo -e "Node: ${idsST[Bold]}${idsCL[LightCyan]}${hostname} (${lip})${idsST[Reset]}${idsCL[LightCyan]} ${LH}${idsCL[Default]}"
|
echo -e "Node hostname: ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}${idsCL[LightCyan]} ${LH}${idsCL[Default]}"
|
||||||
for srvc in "${LOCAL_SERVICES[@]}"
|
for srvc in "${LOCAL_SERVICES[@]}"
|
||||||
do
|
do
|
||||||
echo -en "${NM_SERVICES[${srvc}]} "
|
if [[ "mysql,nginx,gitea,haproxy,keepalived,maxscale" = *"${srvc}"* ]]; then spc=" "; else spc=""; fi
|
||||||
|
echo -en "${NM_SERVICES[${srvc}]} $spc"
|
||||||
if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then
|
if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then
|
||||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||||
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user