This commit is contained in:
2023-11-25 18:19:47 -06:00
parent fd47efce84
commit 2897931043
4 changed files with 41 additions and 10 deletions

View File

@@ -352,7 +352,7 @@ NODEUPDATE() {
c=0; spca=''; spc1=${cw}-${#NODE}; until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done
echo -en "Updating ${NODE}${spca}"
if [ "${nip}" != "100.100.2.1" ] && [ "${nip}" != "10.2.1.1" ]; then
if [ "${nip}" != "100.100.2.1" ] && [ "${nip}" != "10.2.1.1" ] && [ ! -f ${NM_TMPFOLDER}/${nip}.down ; then
if [ "${2}" != "sync" ]; then
echo -en " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : "
if ! ${NCMD} command -v nodemgmt > /dev/null; then
@@ -583,7 +583,7 @@ RUN_COMMAND(){
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then NCMD=''; LH='- localhost'
else NCMD="ssh root@${nip}"; LH=''
fi
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYello]}${LH}${idsCL[Default]}"
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
DIVIDER false green
#echo "Running command: ${NCMD} ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14}"
${NCMD} ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14}
@@ -724,6 +724,37 @@ DOWNLIST(){
echo
}
SETUPSSH(){
echo -e "\n${idsST[Bold]}${idsCL[LightCyan]}Beginning SSH verifiication, you may get prompted for crednetials along the way\n"
for NTYPE in "${NM_NODE_TYPES[@]}"; do
echo -e "${idsST[Bold]}"; DIVIDER
echo -e "${idsCL[Yellow]} ${NM_NODETYPES[$NTYPE]}-Nodes - Verifying SSH Connection${idsCL[Default]}"
DIVIDER; echo -e "${idsST[Reset]}"
nid=1
var=${NTYPE}_HOSTS[@]
for nip in "${!var}"; do
if [[ ${RUN_NODE_IP} != *"${nip}"* ]]; then
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Default]}"
ssh-copy-id root@${nip}
echo
nid=`expr $nid + 1`
fi
done
echo
done
for hostid in "${!host_ip[@]}"; do
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
if [ "${checkhost}" != "false" ]; then
echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - SSH KEY COPY${idsCL[Default]}${idsST[Reset]}"
ssh-copy-id root@${host_ip[$hostid]}
fi
done
}
GUI(){
DISP_HEADER true false