From 98176058a149b6ed5192cffb637cbd23b9432fd0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 24 Nov 2019 09:59:58 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index f2a3cee4..1d4cd735 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1197,7 +1197,11 @@ SERVICE(){ if [ "${3}" != "q" ]; then echo -en "${idsCL[LightYellow]}Verifying nginx config and ssl cert replication across the nodes... ${idsCL[Default]}" fi - PH_CMD="ssh root@${!NT_HOST}" + if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then + PH_CMD="" + else + PH_CMD="ssh root@${!NT_HOST}" + fi ${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/nginx/test.repl" ${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/letsencrypt/test.repl" for nip in "${!NT_HOSTS}"; do