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
|
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'
|
nmip='localhost'
|
||||||
fi
|
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]} : "
|
if [ "${2}" != "sync" ]; then
|
||||||
ssh -tq root@${nmip} "nodemgmt update q"
|
c=0; cw=24; spca=''; spc1=${cw}-7; until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]} ~ ${idsCL[LightCyan]}LinUPx${idsCL[Default]} : "
|
echo -en "Updating Node-Manager[$nmip]${spca} ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : "
|
||||||
ssh -tq root@${nmip} "runup runup"
|
ssh -tq root@${nmip} "nodemgmt update q"
|
||||||
echo -e "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
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
|
echo
|
||||||
for NTYPE in "${NODE_TYPES[@]}"; do
|
for NTYPE in "${NODE_TYPES[@]}"; do
|
||||||
nid=1
|
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
|
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 "Updating ${NODE}${spca}"
|
||||||
|
|
||||||
# echo -en " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : "
|
if [ "${2}" != "sync" ]; then
|
||||||
# if ! ${NCMD} command -v nodemgmt > /dev/null; then
|
echo -en " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : "
|
||||||
# ${NCMD} "bash <(curl -sL https://go.scity.us/install-nodemgmt)" >/dev/null 2>&1
|
if ! ${NCMD} command -v nodemgmt > /dev/null; then
|
||||||
# else
|
${NCMD} "bash <(curl -sL https://go.scity.us/install-nodemgmt)" >/dev/null 2>&1
|
||||||
# ${NCMD} "nodemgmt update q" >/dev/null 2>&1
|
else
|
||||||
# fi
|
${NCMD} "nodemgmt update q" >/dev/null 2>&1
|
||||||
# \ echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
fi
|
||||||
#
|
\ echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
||||||
# echo -en " ~ ${idsCL[LightCyan]}LinUPx${idsCL[Default]} : "
|
|
||||||
# if ! ${NCMD} command -v runup > /dev/null; then
|
echo -en " ~ ${idsCL[LightCyan]}LinUPx${idsCL[Default]} : "
|
||||||
# ${NCMD} bash <(curl -sL https://go.scity.us/install-linupx) >/dev/null 2>&1
|
if ! ${NCMD} command -v runup > /dev/null; then
|
||||||
# else
|
${NCMD} bash <(curl -sL https://go.scity.us/install-linupx) >/dev/null 2>&1
|
||||||
# ${NCMD} "runup runup" >/dev/null 2>&1
|
else
|
||||||
# fi
|
${NCMD} "runup runup" >/dev/null 2>&1
|
||||||
# echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
fi
|
||||||
|
echo -en "${idsCL[Green]}COMPLETE${idsCL[Default]}"
|
||||||
|
fi
|
||||||
|
|
||||||
echo -en " ~ ${idsCL[LightCyan]}Sync Defaults${idsCL[Default]} : "
|
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
|
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