update
This commit is contained in:
13
defaults.inc
13
defaults.inc
@@ -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]}"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user