From 03ee22f2d176cf4c06565c5110bff76aed35d47d Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 27 Jan 2019 20:03:25 -0600 Subject: [PATCH] list out nodes --- nodemgmt-scripts.sh | 16 ++++++++++------ run.sh | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index d7a436be..499488b9 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -70,15 +70,19 @@ case "$1" in elif [ "$2" = "haproxy" ]; then SER='HAProxy' elif [ "$2" = "gogs" ]; then SER='Gogs' fi - if [ "$3" = "start" ]; then STA='Starting' - elif [ "$3" = "stop" ]; then STA='Stopping' - elif [ "$3" = "restart" ]; then STA='Restarting' - elif [ "$3" = "reload" ]; then STA='Reloading' + if [ "$3" = "start" ]; then STA='Starting'; $STAP='Started' + elif [ "$3" = "stop" ]; then STA='Stopping'; $STAP='Stopped' + elif [ "$3" = "restart" ]; then STA='Restarting'; $STAP='Restarted' + elif [ "$3" = "reload" ]; then STA='Reloading'; $STAP='Reloaded' fi - echo -e "${idsCL[LightBlue]}${SER} ${STA}...${idsCL[Default]}" + echo -e "${idsCL[LightBlue]}[[${SER} ${STA}]]${idsCL[Default]}" + echo -e "${idsCL[Cyan]}${STA} Node 1...${idsCL[Default]}" ssh root@10.5.10.51 systemctl $3 $2 + echo -e "${idsCL[Cyan]}${STA} Node 2...${idsCL[Default]}" ssh root@10.5.10.52 systemctl $3 $2 - ssh root@10.5.10.53 systemctl $3 $2 + echo -e "${idsCL[Cyan]}${STA} Node 3...${idsCL[Default]}" + ssh root@10.5.10.53 systemctl $3 $2 + echo -e "${idsCL[Green]}${SER} has been ${STAP}${idsCL[Default]}" exit 0 ;; diff --git a/run.sh b/run.sh index c341944c..60d39570 100755 --- a/run.sh +++ b/run.sh @@ -3,7 +3,7 @@ source /opt/idssys/nodemgmt/settings.conf #echo "" -if [ "$1" != "backup" ]; then +if [ "$1" != "service1111" ]; then cd /opt/idssys/defaults if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then git fetch origin master >/dev/null 2>&1