Update status.inc
This commit is contained in:
@@ -3,37 +3,46 @@ STATUS(){
|
|||||||
start=$(date +%s)
|
start=$(date +%s)
|
||||||
log_start=$(date "+%Y-%m-%d %H:%M:%S")
|
log_start=$(date "+%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
if [ "${1}" == "report" ] || [ "${1}" == "" ]; then
|
# if [ "${1}" == "report" ] || [ "${1}" == "" ]; then
|
||||||
ST_ACTION=${1}
|
# ST_ACTION=${1}
|
||||||
ntypesel=(${NM_NODE_TYPES[@]})
|
|
||||||
# if [ "${NM_NODETYPES[${ST_ACTION^^}]}" != "" ]; then
|
|
||||||
# ntss=${ST_ACTION^^}
|
|
||||||
# ntypesel=(${ntss})
|
|
||||||
# ST_ACTION=${2}
|
|
||||||
# else
|
|
||||||
# ntss=""
|
|
||||||
# ntypesel=(${NM_NODE_TYPES[@]})
|
# ntypesel=(${NM_NODE_TYPES[@]})
|
||||||
# [ "${1}" == "sync" ] && ST_ACTION=repl || ST_ACTION=${1}
|
# # if [ "${NM_NODETYPES[${ST_ACTION^^}]}" != "" ]; then
|
||||||
|
# # ntss=${ST_ACTION^^}
|
||||||
|
# # ntypesel=(${ntss})
|
||||||
|
# # ST_ACTION=${2}
|
||||||
|
# # else
|
||||||
|
# # ntss=""
|
||||||
|
# # ntypesel=(${NM_NODE_TYPES[@]})
|
||||||
|
# # [ "${1}" == "sync" ] && ST_ACTION=repl || ST_ACTION=${1}
|
||||||
|
# # fi
|
||||||
|
# else
|
||||||
|
# while [ $# -gt 0 ]; do
|
||||||
|
# case "$1" in
|
||||||
|
# -site) DEL_SITE=${2};;
|
||||||
|
# -ssl) DEL_SSL=${2};;
|
||||||
|
# -*)
|
||||||
|
# echo -e "Usage: ${idsCL[Yellow]}[nodemgmt or nmg] status {opt}${idsCL[Default]} {"
|
||||||
|
# width=35
|
||||||
|
# printf "%-${width}s- %s\n" " -site {FQDN address}" "(*required)"
|
||||||
|
# printf "%-${width}s- %s\n" " -site {FQDN address}" "(*required)"
|
||||||
|
# printf "%-${width}s- %s\n" " -site {FQDN address}" "(*required)"
|
||||||
|
# printf "%-${width}s- %s\n" " -ssl {yes or [no]}" "Delete SSL certs as well"
|
||||||
|
# printf "%-${width}s- %s\n" " -list" "List sites (same as running nodemgmt delsites)"
|
||||||
|
# echo -e "}\n"
|
||||||
|
# exit 0
|
||||||
|
# ;;
|
||||||
|
# esac
|
||||||
|
# shift
|
||||||
|
# done
|
||||||
# fi
|
# fi
|
||||||
|
if [ "${NM_NODETYPES[${ST_ACTION^^}]}" != "" ]; then
|
||||||
|
ntss=${ST_ACTION^^}
|
||||||
|
ntypesel=(${ntss})
|
||||||
|
ST_ACTION=${2}
|
||||||
else
|
else
|
||||||
while [ $# -gt 0 ]; do
|
ntss=""
|
||||||
case "$1" in
|
ntypesel=(${NM_NODE_TYPES[@]})
|
||||||
-site) DEL_SITE=${2};;
|
[ "${1}" == "sync" ] && ST_ACTION=repl || ST_ACTION=${1}
|
||||||
-ssl) DEL_SSL=${2};;
|
|
||||||
-*)
|
|
||||||
echo -e "Usage: ${idsCL[Yellow]}[nodemgmt or nmg] status {opt}${idsCL[Default]} {"
|
|
||||||
width=35
|
|
||||||
printf "%-${width}s- %s\n" " -site {FQDN address}" "(*required)"
|
|
||||||
printf "%-${width}s- %s\n" " -site {FQDN address}" "(*required)"
|
|
||||||
printf "%-${width}s- %s\n" " -site {FQDN address}" "(*required)"
|
|
||||||
printf "%-${width}s- %s\n" " -ssl {yes or [no]}" "Delete SSL certs as well"
|
|
||||||
printf "%-${width}s- %s\n" " -list" "List sites (same as running nodemgmt delsites)"
|
|
||||||
echo -e "}\n"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PRI_CW=40
|
PRI_CW=40
|
||||||
|
|||||||
Reference in New Issue
Block a user