From 8a8878584cc54798da57876b412fbb9226193726 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 25 Nov 2023 19:03:40 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index eff46968..be680d8f 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -743,10 +743,14 @@ SETUPSSH(){ if [[ ${RUN_NODE_IP} != *"${nip}"* ]]; then echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Default]}" DIVIDER . lightCyan 40 - echo -e "\n${idsCL[LightCyan]}Copying Public SSH Key ...${idsCL[Default]}" - ssh-copy-id root@${nip} - echo -en "\n${idsCL[LightCyan]}Verifying NodeMgmt ... ${idsCL[Default]}" - NODEUPDATE ${nip} verify "ssh" + if [ ! -f ${NM_TMPFOLDER}/${nip}.down ]; then + echo -e "\n${idsCL[LightCyan]}Copying Public SSH Key ...${idsCL[Default]}" + ssh-copy-id root@${nip} + echo -en "\n${idsCL[LightCyan]}Verifying NodeMgmt ... ${idsCL[Default]}" + NODEUPDATE ${nip} verify "ssh" + else + echo -e "\n${idsCL[Yellow]}Host is offline${idsCL[Default]}" + fi echo fi done