update
This commit is contained in:
25
defaults.inc
25
defaults.inc
@@ -22,4 +22,27 @@ NM_SERVICES['keepalived']='Keepalived'
|
||||
NM_SERVICES['maxscale']='MaxScale'
|
||||
NM_SERVICES['cmon']='CC-Controller'
|
||||
NM_SERVICES['cmon-events']='CC-Events Manager'
|
||||
NM_SERVICES['cmon-cloud']='CC-Cloud Daemon'
|
||||
NM_SERVICES['cmon-cloud']='CC-Cloud Daemon'
|
||||
|
||||
DISP_HEADER(){
|
||||
clear
|
||||
echo ""
|
||||
echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
|
||||
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
|
||||
echo -e "Node hostname: ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME}${idsCL[Default]}${idsST[Reset]}"
|
||||
if [ -z ${LOCAL_SERVICES+x} ]; then SERVICES=$( IFS=$','; echo "${NODE_SERVICES[*]}" )
|
||||
else SERVICES=$( IFS=$','; echo "${LOCAL_SERVICES[*]}" )
|
||||
fi
|
||||
IFS=,; SERVICES2=(${SERVICES}); unset IFS
|
||||
for srvc in "${SERVICES2[@]}"
|
||||
do
|
||||
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
|
||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||
fi
|
||||
done
|
||||
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
|
||||
echo ""
|
||||
}
|
||||
Reference in New Issue
Block a user