Update nodemgmt-scripts.sh

This commit is contained in:
2020-10-25 13:36:57 -05:00
parent ff6f8739a9
commit 5deb9d5b4e

View File

@@ -1364,15 +1364,12 @@ SERVICE(){
echo -en "${idsCL[LightYellow]}Verifying nginx config and ssl cert replication across the nodes... ${idsCL[Default]}"
fi
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${!NT_HOST}"* ]]; then
PH_CMD=""
PH_CMD="ssh root@localhost"
else
PH_CMD="ssh root@${!NT_HOST}"
fi
echo "HERE: ${PH_CMD}"
${PH_CMD} "/usr/bin/touch /etc/nginx/test.repl"
${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/nginx/test.repl"
if [ "$NODE_TYPE" != "NC" ]; then
${PH_CMD} "/usr/bin/touch /etc/letsencrypt/test.repl"
${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/letsencrypt/test.repl"
fi
for nip in "${!NT_HOSTS}"; do