From fd343d6ac1299018212d17cf642f6e063957dbc0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 4 Jul 2023 12:04:37 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 66fb31f5..dcd76bc3 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -824,8 +824,8 @@ NODEUPDATE() { fi echo -en " ~ ${idsCL[LightCyan]}Sync Defaults${idsCL[Default]} : " - if [ $(ssh -tq root@${nmip} ls -l --time-style=+%s ${NM_FOLDER}/defaults.local.inc | cut -d ' ' -f 6) -ne $(ssh -tq root@${nip} ls -l --time-style=+%s ${NM_FOLDER}/defaults.local.inc | cut -d ' ' -f 6) ]; then - ssh -tq root@${nmip} "rsync -az ${NM_FOLDER}/defaults.local.inc root@${nip}:${NM_FOLDER}/" >/dev/null 2>&1 + if [ $(ls -l --time-style=+%s ${NM_FOLDER}/defaults.local.inc | cut -d ' ' -f 6) -ne $(ssh -tq root@${nip} ls -l --time-style=+%s ${NM_FOLDER}/defaults.local.inc | cut -d ' ' -f 6) ]; then + rsync -az ${NM_FOLDER}/defaults.local.inc root@${nip}:${NM_FOLDER}/ >/dev/null 2>&1 echo -e "${idsCL[Green]}SYNCED${idsCL[Default]}" else echo -e "${idsCL[Green]}Already Synced${idsCL[Default]}"