Update nodemgmt-scripts.sh
This commit is contained in:
@@ -27,20 +27,11 @@ STATUS() {
|
|||||||
echo -e "${idsCL[LightCyan]}Setting up status checks...${idsCL[Default]}"
|
echo -e "${idsCL[LightCyan]}Setting up status checks...${idsCL[Default]}"
|
||||||
echo
|
echo
|
||||||
declare -i cw; declare -i spc1; declare -i c
|
declare -i cw; declare -i spc1; declare -i c
|
||||||
|
if [ "${1}" = "" ] || [ "${1}" = "report" ] || [ "${1}" = "repl" ]; then
|
||||||
if [ ! -z ${LOCAL_SERVICES+x} ];
|
if [ ! -z ${LOCAL_SERVICES+x} ];
|
||||||
then NHCMD='ssh root@10.5.10.51'
|
then NHCMD='ssh root@10.5.10.51'
|
||||||
else NHCMD=''
|
else NHCMD=''
|
||||||
fi
|
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
|
for rcheck in "${REPL_CHECK[@]}"; do
|
||||||
${NHCMD} rm -f ${FOLDER}/test.repl
|
${NHCMD} rm -f ${FOLDER}/test.repl
|
||||||
daterun=`date +%Y-%m-%d-%H-%M-%S`
|
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"
|
yes | ${NHCMD} "cp -rfH ${FOLDER}/test.repl ${REPL_CHECKS[${rcheck}]}/test.repl"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${1}" = "" ] || [ "${1}" = "report" ] || [ "${1}" = "services" ]; then
|
||||||
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]}"
|
||||||
@@ -109,6 +102,9 @@ STATUS() {
|
|||||||
echo
|
echo
|
||||||
nid=`expr $nid + 1`
|
nid=`expr $nid + 1`
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${1}" = "" ] || [ "${1}" = "report" ] || [ "${1}" = "repl" ]; then
|
||||||
echo -e "${idsST[Bold]}"; DIVIDER
|
echo -e "${idsST[Bold]}"; DIVIDER
|
||||||
echo -e "${idsCL[Yellow]} Replication Status Between the Primary and Secondary Nodes${idsCL[Default]}"
|
echo -e "${idsCL[Yellow]} Replication Status Between the Primary and Secondary Nodes${idsCL[Default]}"
|
||||||
DIVIDER; echo -e "${idsST[Reset]}"
|
DIVIDER; echo -e "${idsST[Reset]}"
|
||||||
@@ -157,6 +153,7 @@ STATUS() {
|
|||||||
fi
|
fi
|
||||||
nid=`expr $nid + 1`
|
nid=`expr $nid + 1`
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
if [ -z $action ] || [ "${action}" = "gui" ]; then
|
if [ -z $action ] || [ "${action}" = "gui" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user