This commit is contained in:
2023-12-12 13:58:18 -06:00
parent c40aad23df
commit de9d727f48
3 changed files with 59 additions and 72 deletions

View File

@@ -3,37 +3,23 @@ STATUS(){
start=$(date +%s)
log_start=$(date "+%Y-%m-%d %H:%M:%S")
if [ "${1}" != "-h" ]; then
if [ "${1}" != "" ] && [ "${NM_NODETYPES[${1^^}]}" != "" ]; then
ntss=${1^^}
ntypesel=(${ntss})
STATUS_ACTION=${2}
else
ntss=""
ntypesel=(${NM_NODE_TYPES[@]})
[ "${1}" == "sync" ] && STATUS_ACTION=repl || STATUS_ACTION=${1}
fi
if [ "${1}" != "" ] && [ "${NM_NODETYPES[${1^^}]}" != "" ]; then
ntss=${1^^}
ntypesel=(${ntss})
STATUS_ACTION=${2}
else
ntss=""
ntypesel=(${NM_NODE_TYPES[@]})
[ "${1}" == "sync" ] && STATUS_ACTION=repl || STATUS_ACTION=${1}
fi
while [ $# -gt 0 ]; do
case "$1" in
-site) DEL_SITE=${2};;
-ssl) DEL_SSL=${2};;
-h)
echo -e "Usage: ${idsCL[Yellow]}[nodemgmt or nmg] status {status-check}${idsCL[Default]} {"
width=25
printf "%-${width}s- %s\n" " {status-check}" "By default will check everything, otherwise specifically specify item to check:"
printf "%-${width}s- %s\n" " services" "Will verify status of all node services"
printf "%-${width}s- %s\n" " dockers" "Will verify status of all node dockers"
printf "%-${width}s- %s\n" " repl" "Will verify status of all node replications"
echo -e "}\n"
rm -Rf ${STATUSRUN_TMPFOLDER}
exit 0
;;
esac
shift
done
# while [ $# -gt 0 ]; do
# case "$1" in
# -site) DEL_SITE=${2};;
# -ssl) DEL_SSL=${2};;
#
# esac
# shift
# done
PRI_CW=40
declare -i cw; declare -i spc1; declare -i c