Update nodemgmt-scripts.sh

This commit is contained in:
2022-07-30 20:32:58 -05:00
parent dfefd78fd1
commit 387d7009ab

View File

@@ -1433,9 +1433,9 @@ SERVICE(){
PH_CMD="ssh root@${!NT_HOST}" PH_CMD="ssh root@${!NT_HOST}"
fi fi
${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/nginx/test.repl" ${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/nginx/test.repl"
if [ "$NODE_TYPE" != "NC" ]; then # if [ "$NODE_TYPE" != "NC" ]; then
${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/letsencrypt/test.repl" # ${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/letsencrypt/test.repl"
fi # fi
for nip in "${!NT_HOSTS}"; do for nip in "${!NT_HOSTS}"; do
checkhost=$(CHECK_HOST ${nip}) checkhost=$(CHECK_HOST ${nip})
if [ "${checkhost}" != "false" ]; then if [ "${checkhost}" != "false" ]; then
@@ -1443,15 +1443,15 @@ SERVICE(){
checked=false checked=false
until [ "${checked}" = "" ]; do until [ "${checked}" = "" ]; do
checked="`${PH_CMD} \"ssh root@${nip} 'if [ -f /etc/nginx/test.repl ]; then cat /etc/nginx/test.repl; fi' | diff - /etc/nginx/test.repl\"`" checked="`${PH_CMD} \"ssh root@${nip} 'if [ -f /etc/nginx/test.repl ]; then cat /etc/nginx/test.repl; fi' | diff - /etc/nginx/test.repl\"`"
checked="`${PH_CMD} \"ssh root@${nip} 'if [ -f /etc/nginx/test.repl ]; then cat /etc/letsencrypt/test.repl; fi' | diff - /etc/letsencrypt/test.repl\"`" # 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 done
fi fi
fi fi
done done
${PH_CMD} rm -f /etc/nginx/test.repl ${PH_CMD} rm -f /etc/nginx/test.repl
if [ "$NODE_TYPE" != "NC" ]; then # if [ "$NODE_TYPE" != "NC" ]; then
${PH_CMD} rm -f /etc/letsencrypt/test.repl # ${PH_CMD} rm -f /etc/letsencrypt/test.repl
fi # fi
fi fi
fi fi