Update nodemgmt-scripts.sh

This commit is contained in:
2024-03-09 12:21:05 -06:00
parent 6d72d6c476
commit b021a9e6b0

View File

@@ -333,9 +333,8 @@ NODEUPDATES() {
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then
nip='localhost ' nip='localhost '
fi fi
# NODEUPDATE "${nip}" "${2}" "${NMCMD}" & NODEUPDATE "${nip}" "${2}" "${NMCMD}" &
((ncount++)) ((ncount++))
echo "HERE ${ncount}: ${nip} = ${NM_HOSTNAMES[${nip}]}"
fi fi
done done
done done
@@ -345,12 +344,12 @@ NODEUPDATES() {
for nodecmd in /tmp/.nodeupdate.*.done; do for nodecmd in /tmp/.nodeupdate.*.done; do
if [[ "${nodecmd}" != *"*"* ]]; then if [[ "${nodecmd}" != *"*"* ]]; then
nodecmd_output=$(cat ${nodecmd}) nodecmd_output=$(cat ${nodecmd})
#[ "${nodecmd_output}" != "" ] && echo -e "${nodecmd_output}" [ "${nodecmd_output}" != "" ] && echo -e "${nodecmd_output}"
#rm -f ${nodecmd} rm -f ${nodecmd}
((nc_count++)) ((nc_count++))
fi fi
done done
# echo "HERE: ${nc_count} - ${ncount}" echo "HERE: ${nc_count} - ${ncount}"
if [ ${nc_count} -eq ${ncount} ]; then if [ ${nc_count} -eq ${ncount} ]; then
completed=true completed=true
break break
@@ -407,7 +406,7 @@ NODEUPDATE(){
fi fi
else 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/*.inc ${NM_FOLDER}/conf/*.conf root@${nip}:${NM_FOLDER}/conf/ & >/dev/null 2>&1
echo -e "${idsCL[Green]}Files Synced${idsCL[Default]}" >> ${tmpfile}.running echo -e "${idsCL[Green]}Files Synced${idsCL[Default]}" >> ${tmpfile}.running
fi fi
else else