Update nodemgmt-scripts.sh
This commit is contained in:
@@ -254,13 +254,14 @@ STATUS(){
|
||||
|
||||
|
||||
for NTYPE in "${NODE_TYPES[@]}"; do
|
||||
GOREPCHK=false;
|
||||
CHR=`date +"%H"`;
|
||||
if [ "${CHR}" -ge "12" ] && [ "${CHR}" -le "13" ] && [ "${NTYPE}" = "NC" ]; then
|
||||
GOREPCHK=true;
|
||||
elif [ "${NTYPE}" != "NC" ]; then
|
||||
GOREPCHK=true;
|
||||
fi
|
||||
#GOREPCHK=false;
|
||||
#CHR=`date +"%H"`;
|
||||
#if [ "${CHR}" -ge "12" ] && [ "${CHR}" -le "13" ] && [ "${NTYPE}" = "NC" ]; then
|
||||
# GOREPCHK=true;
|
||||
#elif [ "${NTYPE}" != "NC" ]; then
|
||||
# GOREPCHK=true;
|
||||
#fi
|
||||
GOREPCHK=true;
|
||||
if [ "${GOREPCHK}" = "true" ]; then
|
||||
PH=${NTYPE}_HOSTS[0]
|
||||
PH_CMD="ssh root@${!PH}"
|
||||
@@ -271,7 +272,7 @@ STATUS(){
|
||||
var=${NTYPE}_HOSTS[@]
|
||||
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 [ "${ST_ACTION}" != "check" ]; then
|
||||
@@ -291,7 +292,7 @@ STATUS(){
|
||||
c=0; cw=30; spc=''
|
||||
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
|
||||
# timeout=`date --date='2 minutes' +%s`
|
||||
|
||||
Reference in New Issue
Block a user