Update nodemgmt-scripts.sh

This commit is contained in:
2025-08-17 19:20:40 -05:00
parent 90131f9125
commit 09785cfa84

View File

@@ -815,22 +815,19 @@ RUN_COMMAND(){
DIVIDER; echo -e "${idsST[Reset]}"
NT_HOSTS=${NTYPE}_HOSTS[@]
for nip in "${!NT_HOSTS}"; do
if [ "${RUN_NODE_IP}" == "${nip}" ]; then
NCMD=''
LH='- localhost'
else
NCMD="${SSHCMD} root@${nip}"
LH=''
fi
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
DIVIDER false green
if [ ! -f /tmp/nmg.run.${nip} ]; then
if [ "${RUN_NODE_IP}" == "${nip}" ]; then
NCMD=''
LH='- localhost'
else
NCMD="${SSHCMD} root@${nip}"
LH=''
fi
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
DIVIDER false green
# echo "Running command: ${NCMD} ${RUNCMD}"
[ "${NCMD}" != "" ] && ${NCMD} "${RUNCMD}" || ${RUNCMD}
touch /tmp/nmg.run.${nip}
else
echo "Skipping, already ran command on this host"
fi
DIVIDER false green
echo