Update nodemgmt-scripts.sh
This commit is contained in:
@@ -743,6 +743,7 @@ MAINTENANCE_MODE(){
|
||||
PRI_CW=40
|
||||
DV_LEN=70
|
||||
declare -i cw; declare -i spc1; declare -i c
|
||||
until [ "${choice^^}" = "E" ]; do
|
||||
item_number=1
|
||||
|
||||
for NTYPE in "${ntypesel[@]}"; do
|
||||
@@ -769,7 +770,12 @@ MAINTENANCE_MODE(){
|
||||
c=0; spc=''; spc1=`expr ${PRI_CW} + 4 - ${#MSG}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightYellow]}${isel} ${idsST[Bold]}${idsCL[LightCyan]}${MSG}${idsST[Reset]}${spc}${idsCL[Default]}: "
|
||||
|
||||
echo -e "${idsCL[LightGreen]}here${idsCL[Default]}"
|
||||
if [ "${choice}" -gt 0 ] 2>/dev/null && [ ${item_number} -eq ${choice} ]; then
|
||||
[ ! -f ${NM_TMPFOLDER}/${nip}.disable ] && touch ${NM_TMPFOLDER}/${nip}.disable || rm -f ${NM_TMPFOLDER}/${nip}.disable
|
||||
fi
|
||||
[ -f ${NM_TMPFOLDER}/${nip}.disable ] && dstatus="${idsCL[LightRed]}OFF" || dstatus="${idsCL[Green]}ON"
|
||||
|
||||
echo -e "${dstatus}${idsCL[Default]}"
|
||||
((item_number++))
|
||||
DIVIDER false lightCyan ${DV_LEN}
|
||||
|
||||
@@ -786,7 +792,12 @@ MAINTENANCE_MODE(){
|
||||
c=0; spc=''; spc1=`expr ${PRI_CW} - ${#NM_SERVICE_DESC[${srvc}]}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightYellow]}${isel} ${idsCL[White]}${NM_SERVICE_DESC[${srvc}]}${spc}${idsCL[Default]}: "
|
||||
|
||||
echo -e "${idsCL[LightGreen]}here${idsCL[Default]}"
|
||||
if [ "${choice}" -gt 0 ] 2>/dev/null && [ ${item_number} -eq ${choice} ]; then
|
||||
[ ! -f ${NM_TMPFOLDER}/${nip}~${srvc}.disable ] && touch ${NM_TMPFOLDER}/${nip}~${srvc}.disable || rm -f ${NM_TMPFOLDER}/${nip}~${srvc}.disable
|
||||
fi
|
||||
[ -f ${NM_TMPFOLDER}/${nip}~${srvc}.disable ] && dstatus="${idsCL[LightRed]}OFF" || dstatus="${idsCL[Green]}ON"
|
||||
|
||||
echo -e "${dstatus}${idsCL[Default]}"
|
||||
((item_number++))
|
||||
done
|
||||
|
||||
@@ -805,7 +816,12 @@ MAINTENANCE_MODE(){
|
||||
c=0; spc=''; spc1=`expr ${PRI_CW} - ${#NM_DOCKER_DESC[${docker}]}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightYellow]}${isel} ${idsCL[White]}${NM_DOCKER_DESC[${docker}]}$spc${idsCL[Default]}: "
|
||||
|
||||
echo -e "${idsCL[LightGreen]}here${idsCL[Default]}"
|
||||
if [ "${choice}" -gt 0 ] 2>/dev/null && [ ${item_number} -eq ${choice} ]; then
|
||||
[ ! -f ${NM_TMPFOLDER}/${nip}~${docker}.disable ] && touch ${NM_TMPFOLDER}/${nip}~${docker}.disable || rm -f ${NM_TMPFOLDER}/${nip}~${docker}.disable
|
||||
fi
|
||||
[ -f ${NM_TMPFOLDER}/${nip}~${docker}.disable ] && dstatus="${idsCL[LightRed]}OFF" || dstatus="${idsCL[Green]}ON"
|
||||
|
||||
echo -e "${dstatus}${idsCL[Default]}"
|
||||
((item_number++))
|
||||
done
|
||||
fi
|
||||
@@ -834,7 +850,12 @@ MAINTENANCE_MODE(){
|
||||
c=0; spc=''; spc1=`expr ${PRI_CW} - ${#NM_REPL_DESC[${rcheck}]}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightYellow]}${isel} ${idsCL[White]}${NM_REPL_DESC[${rcheck}]}${spc}${idsCL[Default]}: "
|
||||
|
||||
echo -e "${idsCL[LightGreen]}here${idsCL[Default]}"
|
||||
if [ "${choice}" -gt 0 ] 2>/dev/null && [ ${item_number} -eq ${choice} ]; then
|
||||
[ ! -f ${NM_TMPFOLDER}/${nip}~${rcheck}.repl.disable ] && touch ${NM_TMPFOLDER}/${nip}~${rcheck}.repl.disable || rm -f ${NM_TMPFOLDER}/${nip}~${rcheck}.repl.disable
|
||||
fi
|
||||
[ -f ${NM_TMPFOLDER}/${nip}~${rcheck}.repl.disable ] && dstatus="${idsCL[LightRed]}OFF" || dstatus="${idsCL[Green]}ON"
|
||||
|
||||
echo -e "${dstatus}${idsCL[Default]}"
|
||||
((item_number++))
|
||||
done
|
||||
echo
|
||||
@@ -842,6 +863,15 @@ MAINTENANCE_MODE(){
|
||||
fi
|
||||
echo
|
||||
done
|
||||
|
||||
echo -en "\n\033[K${idsCL[LightCyan]}Enter # to change notifications [${idsCL[Default]}(${idsCL[LightYellow]}E${idsCL[Default]})xit${idsCL[LightCyan]}] : ${idsCL[Default]}"
|
||||
read -n 1 choice
|
||||
[ "${choice^^}" == "E" ] && break
|
||||
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
}
|
||||
|
||||
SETUPSSH(){
|
||||
|
||||
Reference in New Issue
Block a user