Update nodemgmt-scripts.sh
This commit is contained in:
@@ -70,19 +70,20 @@ case "$1" in
|
||||
elif [ "$2" = "haproxy" ]; then SER='HAProxy'
|
||||
elif [ "$2" = "gogs" ]; then SER='Gogs'
|
||||
fi
|
||||
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[Cyan]}${STA} Node 1...${idsCL[Default]}"
|
||||
#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
|
||||
STA="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"
|
||||
echo -e "${idsCL[LightBlue]}[[${SER} ${STA}ing]]${idsCL[Default]}"
|
||||
echo -e "${idsCL[Cyan]}${STA}ing Node 1...${idsCL[Default]}"
|
||||
ssh root@10.5.10.51 systemctl $3 $2
|
||||
echo -e "${idsCL[Cyan]}${STA} Node 2...${idsCL[Default]}"
|
||||
echo -e "${idsCL[Cyan]}${STA}ing Node 2...${idsCL[Default]}"
|
||||
ssh root@10.5.10.52 systemctl $3 $2
|
||||
echo -e "${idsCL[Cyan]}${STA} Node 3...${idsCL[Default]}"
|
||||
echo -e "${idsCL[Cyan]}${STA}ing Node 3...${idsCL[Default]}"
|
||||
ssh root@10.5.10.53 systemctl $3 $2
|
||||
echo -e "${idsCL[Green]}${SER} has been ${STAP}${idsCL[Default]}"
|
||||
echo -e "${idsCL[Green]}${SER} has been ${STA}ed${idsCL[Default]}"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user