Update nodemgmt-scripts.sh

This commit is contained in:
2023-04-13 18:44:41 -05:00
parent 806c6da39a
commit 1bd6ca0deb

View File

@@ -451,6 +451,8 @@ STATUS(){
else
timeout=`date --date='2 minutes' +%s`
fi
warn_timeout=`date --date='1 minutes' +%s`
checked=false
until [ "${checked}" = "" ]; do
@@ -459,9 +461,11 @@ STATUS(){
else
ssh -q root@${nip} [[ -f ${REPL_CHECKS[${rcheck}]}/test.repl ]] && checked="`${PH_CMD} \"ssh root@${nip} \"cat ${REPL_CHECKS[${rcheck}]}/test.repl\" | diff - ${REPL_CHECKS[${rcheck}]}/test.repl\"`"
fi
if [ "`date +%s`" -gt "$timeout" ]; then
if [ "`date +%s`" -gt "${timeout}" ]; then
timeout=true
break
elif [ "`date +%s`" -gt "${warn_timeout}" ]; then
echo -en " waiting for sync... "
fi
done
if [ "${timeout}" = "true" ]; then