Update nodemgmt-scripts.sh
This commit is contained in:
@@ -782,12 +782,16 @@ NODEUPDATE() {
|
||||
if [[ $(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) == *"${nmip}"* ]]; then
|
||||
nmip='localhost'
|
||||
fi
|
||||
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"
|
||||
echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]} ~ ${idsCL[LightCyan]}LinUPx${idsCL[Default]} : "
|
||||
ssh -tq root@${nmip} "runup runup"
|
||||
echo -e "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
||||
|
||||
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"
|
||||
echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]} ~ ${idsCL[LightCyan]}LinUPx${idsCL[Default]} : "
|
||||
ssh -tq root@${nmip} "runup runup"
|
||||
echo -e "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
echo
|
||||
for NTYPE in "${NODE_TYPES[@]}"; do
|
||||
nid=1
|
||||
@@ -801,21 +805,23 @@ NODEUPDATE() {
|
||||
c=0; cw=40; spca=''; spc1=${cw}-${#NODE}; until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done
|
||||
echo -en "Updating ${NODE}${spca}"
|
||||
|
||||
# echo -en " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : "
|
||||
# if ! ${NCMD} command -v nodemgmt > /dev/null; then
|
||||
# ${NCMD} "bash <(curl -sL https://go.scity.us/install-nodemgmt)" >/dev/null 2>&1
|
||||
# else
|
||||
# ${NCMD} "nodemgmt update q" >/dev/null 2>&1
|
||||
# fi
|
||||
# \ echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
||||
#
|
||||
# echo -en " ~ ${idsCL[LightCyan]}LinUPx${idsCL[Default]} : "
|
||||
# if ! ${NCMD} command -v runup > /dev/null; then
|
||||
# ${NCMD} bash <(curl -sL https://go.scity.us/install-linupx) >/dev/null 2>&1
|
||||
# else
|
||||
# ${NCMD} "runup runup" >/dev/null 2>&1
|
||||
# fi
|
||||
# echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
||||
if [ "${2}" != "sync" ]; then
|
||||
echo -en " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : "
|
||||
if ! ${NCMD} command -v nodemgmt > /dev/null; then
|
||||
${NCMD} "bash <(curl -sL https://go.scity.us/install-nodemgmt)" >/dev/null 2>&1
|
||||
else
|
||||
${NCMD} "nodemgmt update q" >/dev/null 2>&1
|
||||
fi
|
||||
\ echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
||||
|
||||
echo -en " ~ ${idsCL[LightCyan]}LinUPx${idsCL[Default]} : "
|
||||
if ! ${NCMD} command -v runup > /dev/null; then
|
||||
${NCMD} bash <(curl -sL https://go.scity.us/install-linupx) >/dev/null 2>&1
|
||||
else
|
||||
${NCMD} "runup runup" >/dev/null 2>&1
|
||||
fi
|
||||
echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user