update
This commit is contained in:
13
defaults.inc
13
defaults.inc
@@ -57,21 +57,24 @@ REPL_DESC['gitssh']='Gitea SSH Keys'
|
|||||||
|
|
||||||
|
|
||||||
DISP_HEADER(){
|
DISP_HEADER(){
|
||||||
|
declare -i cw; declare -i spc1; declare -i c
|
||||||
if [ "$1" = true ]; then
|
if [ "$1" = true ]; then
|
||||||
clear
|
clear
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
|
echo -e "${idsCL[LightYellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
|
||||||
DIVIDER
|
DIVIDER . lightYellow
|
||||||
if [ "$2" = true ]; then
|
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[*]}" )
|
if [ -z ${LOCAL_SERVICES+x} ]; then SERVICES=$( IFS=$','; echo "${NODE_SERVICES[*]}" )
|
||||||
else SERVICES=$( IFS=$','; echo "${LOCAL_SERVICES[*]}" )
|
else SERVICES=$( IFS=$','; echo "${LOCAL_SERVICES[*]}" )
|
||||||
fi
|
fi
|
||||||
IFS=,; SERVICES2=(${SERVICES}); unset IFS
|
IFS=,; SERVICES2=(${SERVICES}); unset IFS
|
||||||
for srvc in "${SERVICES2[@]}"; do
|
for srvc in "${SERVICES2[@]}"; do
|
||||||
if [[ "mysql,nginx,gitea,haproxy,keepalived,maxscale" = *"${srvc}"* ]]; then spc=" "; else spc=""; fi
|
c=0; cw=22; spc=''
|
||||||
echo -en "${NM_SERVICES[${srvc}]} $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
|
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]}"
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ STATUS() {
|
|||||||
echo
|
echo
|
||||||
echo -e "${idsCL[Yellow]} Replication Status to Other Nodes${idsCL[Default]}"
|
echo -e "${idsCL[Yellow]} Replication Status to Other Nodes${idsCL[Default]}"
|
||||||
DIVIDER true
|
DIVIDER true
|
||||||
timeout=`date --date='40 seconds' +%s`
|
timeout=`date --date='20 seconds' +%s`
|
||||||
nid=1
|
nid=1
|
||||||
for nip in "${NODE_HOSTS[@]}"
|
for nip in "${NODE_HOSTS[@]}"
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user