This commit is contained in:
2019-02-07 10:39:16 -06:00
parent eac734efdf
commit 9417a66d48
2 changed files with 9 additions and 6 deletions

View File

@@ -57,21 +57,24 @@ REPL_DESC['gitssh']='Gitea SSH Keys'
DISP_HEADER(){
declare -i cw; declare -i spc1; declare -i c
if [ "$1" = true ]; then
clear
fi
echo ""
echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
DIVIDER
echo -e "${idsCL[LightYellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
DIVIDER . lightYellow
if [ "$2" = true ]; then
echo -e "Node hostname: ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME}${idsCL[Default]}${idsST[Reset]}"
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"
c=0; cw=22; spc=''
spc1=${cw}-${#NM_SERVICES[${srvc}]}
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
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]}"

View File

@@ -75,7 +75,7 @@ STATUS() {
echo
echo -e "${idsCL[Yellow]} Replication Status to Other Nodes${idsCL[Default]}"
DIVIDER true
timeout=`date --date='40 seconds' +%s`
timeout=`date --date='20 seconds' +%s`
nid=1
for nip in "${NODE_HOSTS[@]}"
do