Update nodemgmt-scripts.sh
This commit is contained in:
@@ -332,28 +332,27 @@ NODEUPDATES() {
|
|||||||
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then
|
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then
|
||||||
nip='localhost '
|
nip='localhost '
|
||||||
fi
|
fi
|
||||||
echo "HERE: ${nip} - ${2}"
|
NODEUPDATE "${nip}" "${2}" "${NMCMD}" &
|
||||||
NODEUPDATE "${nip}" "${2}" "${NMCMD}" ###&
|
|
||||||
((ncount++))
|
((ncount++))
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# nc_count=0; completed=false
|
nc_count=0; completed=false
|
||||||
# until [ "${completed}" == "true" ]; do
|
until [ "${completed}" == "true" ]; do
|
||||||
# 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
|
||||||
# if [ ${nc_count} -eq ${ncount} ]; then
|
if [ ${nc_count} -eq ${ncount} ]; then
|
||||||
# completed=true
|
completed=true
|
||||||
# break
|
break
|
||||||
# fi
|
fi
|
||||||
# sleep 2s
|
sleep 2s
|
||||||
# done
|
done
|
||||||
|
|
||||||
echo -e "${idsCL[Green]}All Nodes have been Updated.${idsCL[Default]}"
|
echo -e "${idsCL[Green]}All Nodes have been Updated.${idsCL[Default]}"
|
||||||
echo
|
echo
|
||||||
@@ -403,9 +402,9 @@ NODEUPDATE(){
|
|||||||
${NCMD} "nodemgmt update q" >> ${tmpfile}.running
|
${NCMD} "nodemgmt update q" >> ${tmpfile}.running
|
||||||
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
|
||||||
echo -e " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : Skipping BETA Update" >> ${tmpfile}.running
|
echo -e " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : Skipping BETA Update" >> ${tmpfile}.running
|
||||||
@@ -415,7 +414,7 @@ NODEUPDATE(){
|
|||||||
else
|
else
|
||||||
echo -e " ~ ${idsCL[LightCyan]}Skipping${idsCL[Default]}" >> ${tmpfile}.running
|
echo -e " ~ ${idsCL[LightCyan]}Skipping${idsCL[Default]}" >> ${tmpfile}.running
|
||||||
fi
|
fi
|
||||||
mv ${tmpfile}.running ${tmpfile}.done
|
[ -f ${tmpfile}.running ] && mv ${tmpfile}.running ${tmpfile}.done || touch ${tmpfile}.done
|
||||||
}
|
}
|
||||||
|
|
||||||
ADD_LOGROTATE_CRONTAB(){
|
ADD_LOGROTATE_CRONTAB(){
|
||||||
@@ -1215,7 +1214,7 @@ GUI(){
|
|||||||
if [ "${2}" == "report" ]; then
|
if [ "${2}" == "report" ]; then
|
||||||
[ "${3}" == "sync" ] && ufile=update-nodes-sync.lastrun || ufile=update-nodes.lastrun
|
[ "${3}" == "sync" ] && ufile=update-nodes-sync.lastrun || ufile=update-nodes.lastrun
|
||||||
rm -f ${NM_LOGFOLDER}/${ufile}
|
rm -f ${NM_LOGFOLDER}/${ufile}
|
||||||
NODEUPDATES ${2} ${3} ###> ${NM_LOGFOLDER}/${ufile}
|
NODEUPDATES ${2} ${3} > ${NM_LOGFOLDER}/${ufile}
|
||||||
else
|
else
|
||||||
NODEUPDATES ${2} ${3}
|
NODEUPDATES ${2} ${3}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user