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