Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 12:20:48 -06:00
parent b5d9635064
commit e6312b3468

View File

@@ -37,48 +37,48 @@ STATUS() {
fi fi
done done
# echo -e "${idsST[Bold]}"; DIVIDER echo -e "${idsST[Bold]}"; DIVIDER
# echo -e "${idsCL[Yellow]} Node Service Status${idsCL[Default]}" echo -e "${idsCL[Yellow]} Node Service Status${idsCL[Default]}"
# DIVIDER; echo -e "${idsST[Reset]}" DIVIDER; echo -e "${idsST[Reset]}"
# if [ ! -z ${LOCAL_SERVICES+x} ]; then if [ ! -z ${LOCAL_SERVICES+x} ]; then
# lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) lip=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
# echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}${idsCL[LightCyan]} - localhost${idsCL[Default]}" echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}${idsCL[LightCyan]} - localhost${idsCL[Default]}"
# DIVIDER false green DIVIDER false green
# for srvc in "${LOCAL_SERVICES[@]}" for srvc in "${LOCAL_SERVICES[@]}"
# do do
# c=0; cw=22; spc='' c=0; cw=22; spc=''
# spc1=${cw}-${#NM_SERVICES[${srvc}]} spc1=${cw}-${#NM_SERVICES[${srvc}]}
# until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
# echo -en " ${NM_SERVICES[${srvc}]}$spc: " 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]}"
# fi fi
# done done
# echo echo
# fi fi
# nid=1 nid=1
# for nip in "${NODE_HOSTS[@]}" for nip in "${NODE_HOSTS[@]}"
# do do
# if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD=''; LH='- localhost' if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD=''; LH='- localhost'
# else NCMD="ssh root@${nip}"; LH='' else NCMD="ssh root@${nip}"; LH=''
# fi fi
# echo -e " ${idsST[Bold]}${idsCL[LightCyan]}iDS-Node${nid} (${nip})${idsST[Reset]}${idsCL[LightCyan]} ${LH}${idsCL[Default]}" echo -e " ${idsST[Bold]}${idsCL[LightCyan]}iDS-Node${nid} (${nip})${idsST[Reset]}${idsCL[LightCyan]} ${LH}${idsCL[Default]}"
# DIVIDER false green DIVIDER false green
# for srvc in "${NODE_SERVICES[@]}" for srvc in "${NODE_SERVICES[@]}"
# do do
# c=0; cw=22; spc='' c=0; cw=22; spc=''
# spc1=${cw}-${#NM_SERVICES[${srvc}]} spc1=${cw}-${#NM_SERVICES[${srvc}]}
# until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
# echo -en " ${NM_SERVICES[${srvc}]}$spc: " echo -en " ${NM_SERVICES[${srvc}]}$spc: "
# if [ $(${NCMD} pgrep ${srvc} | wc -l) -gt "0" ]; then if [ $(${NCMD} 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]}"
# fi fi
# done done
# echo echo
# nid=`expr $nid + 1` nid=`expr $nid + 1`
# done done
echo -e "${idsST[Bold]}"; DIVIDER echo -e "${idsST[Bold]}"; DIVIDER
echo -e "${idsCL[Yellow]} Replication Status to Other Nodes${idsCL[Default]}" echo -e "${idsCL[Yellow]} Replication Status to Other Nodes${idsCL[Default]}"
DIVIDER; echo -e "${idsST[Reset]}" DIVIDER; echo -e "${idsST[Reset]}"