Update defaults.inc

This commit is contained in:
2019-02-04 00:00:14 -06:00
parent 7b18343add
commit 06bbe434d6

View File

@@ -29,20 +29,21 @@ DISP_HEADER(){
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]}"
if [ "$1" != false ]; then
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
done
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
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]}"
fi
echo ""
}