Update nodemgmt-scripts.sh

This commit is contained in:
2023-07-04 12:06:45 -05:00
parent fd343d6ac1
commit 3d2d8db3b1

View File

@@ -786,13 +786,16 @@ NODEUPDATE() {
if [ "${2}" != "sync" ]; then
c=0; cw=24; spca=''; spc1=${cw}-7; until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done
echo -en "Updating Node-Manager[$nmip]${spca} ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : "
ssh -tq root@${nmip} "nodemgmt update q"
ssh -tq root@${nmip} "nodemgmt update q" >/dev/null 2>&1
echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]} ~ ${idsCL[LightCyan]}LinUPx${idsCL[Default]} : "
ssh -tq root@${nmip} "runup runup"
ssh -tq root@${nmip} "runup runup" >/dev/null 2>&1
echo -e "${idsCL[Green]}COMPLETE${idsCL[Default]}"
fi
echo
nmdiv=$(ls -l --time-style=+%s ${NM_FOLDER}/defaults.local.inc | cut -d ' ' -f 6)
for NTYPE in "${NODE_TYPES[@]}"; do
nid=1
var=${NTYPE}_HOSTS[@]
@@ -824,7 +827,7 @@ NODEUPDATE() {
fi
echo -en " ~ ${idsCL[LightCyan]}Sync Defaults${idsCL[Default]} : "
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
if [ ${nmdiv} -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