This commit is contained in:
2023-06-23 19:32:14 -05:00
parent b815ab1793
commit bf84e2c215
2 changed files with 3 additions and 2 deletions

View File

@@ -520,7 +520,6 @@ SERVICE(){
else
PH_CMD="ssh root@${!NT_HOST}"
fi
echo $PH_CMD
${PH_CMD} touch ${NGINX_PATHS[${NODE_TYPE}]}/test.repl
# ${PH_CMD} "echo -e \"Service ${1} ${2}\" >> ${NGINX_PATHS[${NODE_TYPE}]}/test.repl"
for nip in "${!NT_HOSTS}"; do
@@ -530,6 +529,8 @@ SERVICE(){
checked=false
until [ "${checked}" = "" ]; do
checked="`${PH_CMD} \"ssh root@${nip} '[ -f ${NGINX_PATHS[${NODE_TYPE}]}/test.repl ] && cat -u ${NGINX_PATHS[${NODE_TYPE}]}/test.repl' | diff -q - ${NGINX_PATHS[${NODE_TYPE}]}/test.repl\"`"
checked="`${PH_CMD} \"ssh root@${nip} '[ -f '${NGINX_PATHS[${NODE_TYPE}]}'/test.repl ] && [ $(expr $(date +%s) - $(stat -L --format %Y '${NGINX_PATHS[${NODE_TYPE}]}'/test.repl)) -le 10 ] && echo true'\"`"
# checked="`${PH_CMD} \"ssh root@${nip} 'if [ -f /etc/nginx/test.repl ]; then cat /etc/letsencrypt/test.repl; fi' | diff - /etc/letsencrypt/test.repl\"`"
done
fi