From ec3e651c0d13910399398ad3cc5e0f926d1d4897 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 28 Jan 2019 21:52:13 -0600 Subject: [PATCH] Update 'nodemgmt-scripts.sh' --- nodemgmt-scripts.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 15c27419..d449d419 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -25,19 +25,23 @@ unset IFS case "$1" in service) containsElement "${2}" "${NODE_SERVICES[@]}" - if [[ "start,stop,restart" != *"${3}"* ]]; then + if [[ "start,stop,restart,ebale,disable" != *"${3}"* ]]; then echo -e "${idsCL[Red]}(${3}) is not an allowed service action.${idsCL[Default]}" exit 1 fi if [ "$2" = "mysql" ]; then SER='MySQL' elif [ "$2" = "nginx" ]; then SER='NGINX' elif [ "$2" = "gogs" ]; then SER='Gogs' + elif [ "$2" = "gitea" ]; then SER='Gitea' elif [ "$2" = "haproxy" ]; then SER='HAProxy' elif [ "$2" = "keepalived" ]; then SER='Keepalived' elif [ "$2" = "maxscale" ]; then SER='MaxScale' else SER="${2}" fi - if [ "$3" = "stop" ]; then ADISP='Stopp'; else ADISP="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"; fi + if [ "$3" = "stop" ]; then ADISP='Stopp'; + elif [ "$3" = "enable" ]; then ADISP='Enabl'; + elif [ "$3" = "disable" ]; then ADISP='Disabl'; + else ADISP="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"; fi if [ "$3" = "start" ] && [ "$2" = "haproxy" ]; then TACT='restart'; else TACT="${3}"; fi echo -e "${idsCL[LightGreen]}[[${SER} ${ADISP}ing]]${idsCL[Default]}"