Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 20:10:25 -06:00
parent 02e7cb5640
commit 2fa7aaea22

View File

@@ -27,20 +27,11 @@ STATUS() {
echo -e "${idsCL[LightCyan]}Setting up status checks...${idsCL[Default]}"
echo
declare -i cw; declare -i spc1; declare -i c
if [ "${1}" = "" ] || [ "${1}" = "report" ] || [ "${1}" = "repl" ]; then
if [ ! -z ${LOCAL_SERVICES+x} ];
then NHCMD='ssh root@10.5.10.51'
else NHCMD=''
fi
# for nip in "${NODE_HOSTS[@]}"; do
# if [ "${nip}" = '10.5.10.51' ] && [ ! -z ${LOCAL_SERVICES+x} ]; then isreplhost=true; else isreplhost=false; fi
# if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${isreplhost}" = "false" ]; then
# NCMD="ssh root@${nip}"
# for rcheck in "${REPL_CHECK[@]}"; do
# ${NCMD} touch ${REPL_CHECKS[${rcheck}]}/test.repl
# done
# fi
# done
for rcheck in "${REPL_CHECK[@]}"; do
${NHCMD} rm -f ${FOLDER}/test.repl
daterun=`date +%Y-%m-%d-%H-%M-%S`
@@ -52,7 +43,9 @@ STATUS() {
yes | ${NHCMD} "cp -rfH ${FOLDER}/test.repl ${REPL_CHECKS[${rcheck}]}/test.repl"
fi
done
fi
if [ "${1}" = "" ] || [ "${1}" = "report" ] || [ "${1}" = "services" ]; then
echo -e "${idsST[Bold]}"; DIVIDER
echo -e "${idsCL[Yellow]} Node Service Status${idsCL[Default]}"
DIVIDER; echo -e "${idsST[Reset]}"
@@ -109,6 +102,9 @@ STATUS() {
echo
nid=`expr $nid + 1`
done
fi
if [ "${1}" = "" ] || [ "${1}" = "report" ] || [ "${1}" = "repl" ]; then
echo -e "${idsST[Bold]}"; DIVIDER
echo -e "${idsCL[Yellow]} Replication Status Between the Primary and Secondary Nodes${idsCL[Default]}"
DIVIDER; echo -e "${idsST[Reset]}"
@@ -157,6 +153,7 @@ STATUS() {
fi
nid=`expr $nid + 1`
done
fi
echo ""
if [ -z $action ] || [ "${action}" = "gui" ]; then