From 934e56be1c38955147e6e78b43dbb313858317a7 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 7 Jan 2024 09:34:35 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 321a605b..aeaa0729 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -367,6 +367,10 @@ NODEUPDATE(){ if [ "${betacheck}" == "false" ]; then if [ "${2}" != "sync" ]; then [ ${noup} -eq 0 ] && echo -en " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : " + if [ "$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${nip} echo ok 2>&1)" != "ok" ]; then + echo -e "${idsCL[Yellow]}New server, needs SSH credentials${idsCL[Default]}" + ssh-copy-id root@${nip} + fi if ! ${NCMD} command -v nodemgmt > /dev/null; then ${NCMD} "bash <(curl -sL https://go.scity.us/install-nodemgmt)" >/dev/null 2>&1 ${NMCMD} rsync -az ${NM_FOLDER}/conf/*.inc ${NM_FOLDER}/conf/*.conf root@${nip}:${NM_FOLDER}/conf/ & >/dev/null 2>&1