Update nodemgmt-scripts.sh
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
action="$1"
|
||||
VERS='1.01272019'
|
||||
CERT_DAEMON='/usr/bin/certbot'
|
||||
NODE_SERVICES=mysql,nginx,gogs,haproxy,keepalived,maxscale
|
||||
|
||||
source /opt/idssys/nodemgmt/settings.conf
|
||||
source /opt/idssys/defaults/colors.inc
|
||||
@@ -15,16 +16,19 @@ fi
|
||||
|
||||
IFS=,
|
||||
NODE_HOSTS=(${NODE_HOSTS})
|
||||
NODE_SERVICES=(${NODE_SERVICES})
|
||||
unset IFS
|
||||
|
||||
# ========================================================= #
|
||||
|
||||
case "$1" in
|
||||
service)
|
||||
if [ "$2" = "nginx" ]; then SER='NGINX'
|
||||
elif [ "$2" = "haproxy" ]; then SER='HAProxy'
|
||||
elif [ "$2" = "mysql" ]; then SER='MySQL'
|
||||
elif [ "$2" = "gogs" ]; then SER='Gogs'
|
||||
if [ "$2" = "mysql" ]; then SER='MySQL'
|
||||
elif [ "$2" = "nginx" ]; then SER='NGINX'
|
||||
elif [ "$2" = "gogs" ]; then SER='Gogs'
|
||||
elif [ "$2" = "haproxy" ]; then SER='HAProxy'
|
||||
elif [ "$2" = "keepalived" ]; then SER='Keepalived'
|
||||
elif [ "$2" = "maxscale" ]; then SER='MaxScale'
|
||||
fi
|
||||
if [ "$3" = "stop" ]; then ADISP='Stopp'; else ADISP="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"; fi
|
||||
if [ "$3" = "start" ] && [ "$2" = "haproxy" ]; then TACT='restart'; else TACT="${3}"; fi
|
||||
|
||||
Reference in New Issue
Block a user