This commit is contained in:
2024-11-29 14:02:50 -06:00
parent 463dbb27c7
commit e93a41c823
2 changed files with 5 additions and 5 deletions

View File

@@ -441,18 +441,18 @@ NODEUPDATE(){
${NCMD} "nodemgmt update q" >> ${tmpfile}.running
fi
else
echo -en " ~ ${idsCL[LightCyan]}Sync Shared Nodemgmt Defaults${idsCL[Default]} : " >> ${tmpfile}.running
# echo -en " ~ ${idsCL[LightCyan]}Sync Shared Nodemgmt Defaults${idsCL[Default]} : " >> ${tmpfile}.running
${NMCMD} rsync -az ${NM_FOLDER}/conf/*.inc ${NM_FOLDER}/conf/*.conf root@${nip}:${NM_FOLDER}/conf/ & >/dev/null 2>&1
${NMCMD} rsync -az ${NM_FOLDER}/conf/powerwall ${NM_FOLDER}/conf/*.conf root@${nip}:${NM_FOLDER}/conf/ >/dev/null 2>&1
echo -e "${idsCL[Green]}Files Synced${idsCL[Default]}" >> ${tmpfile}.running
fi
else
echo -e " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : Skipping BETA Update" >> ${tmpfile}.running
echo -e "${idsCL[LightCyan]}Skipping BETA Update${idsCL[Default]}" >> ${tmpfile}.running
fi
elif [ -f ${NM_TMPFOLDER}/${nip}.down ]; then
echo -e " ~ ${idsCL[LightCyan]}Skipping, host is offline${idsCL[Default]}" >> ${tmpfile}.running
echo -e "${idsCL[LightCyan]}Skipping, host is offline${idsCL[Default]}" >> ${tmpfile}.running
else
echo -e " ~ ${idsCL[LightCyan]}Skipping${idsCL[Default]}" >> ${tmpfile}.running
echo -e "${idsCL[LightCyan]}Skipping${idsCL[Default]}" >> ${tmpfile}.running
fi
[ -f ${tmpfile}.running ] && mv ${tmpfile}.running ${tmpfile}.done || touch ${tmpfile}.done
}

2
run.sh
View File

@@ -10,7 +10,7 @@ source /opt/idssys/nodemgmt/conf/settings.conf
source /opt/idssys/nodemgmt/defaults.inc
# if [[ "${noheader}" != *" ${1} "* ]] && [[ "${noheader}" != *" ${2} "* ]] && [ "${1}" != "status" ]; then
if [ "${1}" == "update" ] || [ "${1}" == "update-nodes" ]; then
if [ "${1}" == "update" ] || ([ "${1}" == "update-nodes" ] && [ "${3}" != "sync" ]); then
if [ "${1}" == "update-nodes" ]; then
echo -e "\n${idsCL[LightGreen]}Updating Node-Manager${idsCL[Default]}"
echo -e "${idsCL[LightGreen]}-------------------------------------------${idsCL[Default]}"