From fba0f8b372a19b5eac0d7985628dae205ceedaa2 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 27 Jan 2019 19:54:25 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 31e1d7a9..12ead343 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -66,13 +66,14 @@ MAIN_MENU() { case "$1" in service) - if [ "$3" = "nginx" ]; then SER='NGINX' - elif[ "$3" = "haproxy" ]; then SER='HAProxy' - elif[ "$3" = "gogs" ]; then SER='Gogs' + if [ "$2" = "nginx" ]; then SER='NGINX' + elif [ "$2" = "haproxy" ]; then SER='HAProxy' + elif [ "$2" = "gogs" ]; then SER='Gogs' fi - if [ "$2" = "start" ]; then STA='Starting' - elif[ "$3" = "stop" ]; then STA='Stopping' - elif[ "$3" = "restart" ]; then STA='Restarting' + if [ "$3" = "start" ]; then STA='Starting' + elif [ "$3" = "stop" ]; then STA='Stopping' + elif [ "$3" = "restart" ]; then STA='Restarting' + elif [ "$3" = "reload" ]; then STA='Reloading' fi echo -e "${idsCL[LightBlue]}${SER} ${STA}...${idsCL[Default]}" ssh root@10.5.10.51 systemctl $3 $2