Update nodemgmt-scripts.sh

This commit is contained in:
2022-07-24 15:18:35 -05:00
parent f515f56083
commit 70820f864e

View File

@@ -254,13 +254,14 @@ STATUS(){
for NTYPE in "${NODE_TYPES[@]}"; do for NTYPE in "${NODE_TYPES[@]}"; do
GOREPCHK=false; #GOREPCHK=false;
CHR=`date +"%H"`; #CHR=`date +"%H"`;
if [ "${CHR}" -ge "12" ] && [ "${CHR}" -le "13" ] && [ "${NTYPE}" = "NC" ]; then #if [ "${CHR}" -ge "12" ] && [ "${CHR}" -le "13" ] && [ "${NTYPE}" = "NC" ]; then
# GOREPCHK=true;
#elif [ "${NTYPE}" != "NC" ]; then
# GOREPCHK=true;
#fi
GOREPCHK=true; GOREPCHK=true;
elif [ "${NTYPE}" != "NC" ]; then
GOREPCHK=true;
fi
if [ "${GOREPCHK}" = "true" ]; then if [ "${GOREPCHK}" = "true" ]; then
PH=${NTYPE}_HOSTS[0] PH=${NTYPE}_HOSTS[0]
PH_CMD="ssh root@${!PH}" PH_CMD="ssh root@${!PH}"
@@ -271,7 +272,7 @@ STATUS(){
var=${NTYPE}_HOSTS[@] var=${NTYPE}_HOSTS[@]
for nip in "${!var}"; do for nip in "${!var}"; do
echo "CHECK: ${NTYPE} - ${nip}" # echo "CHECK: ${NTYPE} - ${nip}"
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${nip}" != "${!PH}" ]; then if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${nip}" != "${!PH}" ]; then
if [ "${ST_ACTION}" != "check" ]; then if [ "${ST_ACTION}" != "check" ]; then
@@ -291,7 +292,7 @@ STATUS(){
c=0; cw=30; spc='' c=0; cw=30; spc=''
spc1=${cw}-${#REPL_DESC[${rcheck}]} spc1=${cw}-${#REPL_DESC[${rcheck}]}
echo "CHECK: ${NTYPE} - ${!PH} - ${REPL_CHECKS[${rcheck}]}" # echo "CHECK: ${NTYPE} - ${!PH} - ${REPL_CHECKS[${rcheck}]}"
# if [ "${rcheck}" = "nextcloud-data" ] || [ "${rcheck}" = "nextcloud-www" ]; then # if [ "${rcheck}" = "nextcloud-data" ] || [ "${rcheck}" = "nextcloud-www" ]; then
# timeout=`date --date='2 minutes' +%s` # timeout=`date --date='2 minutes' +%s`