Update nodemgmt-scripts.sh

This commit is contained in:
2020-10-25 13:31:03 -05:00
parent 2bd9888bfd
commit a8fc7b9f0b

View File

@@ -1368,9 +1368,11 @@ SERVICE(){
else
PH_CMD="ssh root@${!NT_HOST}"
fi
${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/nginx/test.repl 2>&1"
touch /etc/nginx/test.repl
${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 2>&1"
touch /etc/letsencrypt/test.repl
${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/letsencrypt/test.repl"
fi
for nip in "${!NT_HOSTS}"; do
checkhost=$(CHECK_HOST ${nip})
@@ -1378,8 +1380,8 @@ SERVICE(){
if [ "${nip}" != "${!NT_HOST}" ]; then
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 2>&1\"`"
checked="`${PH_CMD} \"ssh root@${nip} 'if [ -f /etc/nginx/test.repl ]; then cat /etc/letsencrypt/test.repl; fi' | diff - /etc/letsencrypt/test.repl 2>&1\"`"
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\"`"
done
fi
fi