Update nodemgmt-scripts.sh

This commit is contained in:
2023-12-12 08:06:56 -06:00
parent dbdb45164c
commit 88c3793d03

View File

@@ -588,24 +588,30 @@ RUN_COMMAND(){
}
DOWNLIST(){
if [ "${1}" = "report" ]; then
unset idsCL idsBG idsST
idsCL=('')
idsBG=('')
idsST=('')
fi
declare -i cw; declare -i spc1; declare -i c
DOWN_LIST=`find ${NM_FOLDER} -name "*.down"`
IFS=$'\n'
read -rd '' -a DOWNLIST <<<"${DOWN_LIST}"
read -rd '' -a DOWN_LIST <<<"${DOWN_LIST}"
unset IFS
# if [ "${1}" = "report" ]; then
# DOWNLIST=${DOWN_LIST}
# unset idsCL idsBG idsST
# idsCL=('')
# idsBG=('')
# idsST=('')
# else
DOWNLIST=()
for dli in "${DOWNLIST[@]}"; do
[ ! -f ${dli/disable/down} ] && DOWNLIST+=(${dli})
done
# fi
if [ -z ${ACTION} ] || [ "${ACTION}" = "gui" ]; then
DIVIDER true
fi
echo
if [ "${DOWN_LIST}" == "" ]; then
if [ "${DOWNLIST}" == "" ]; then
echo -e "${idsCL[LightCyan]}Nothing is down. Hooray for you!!${idsCL[Default]}"
echo -en "\nWanna see something great for being so awesome? (y/N) "