list out nodes
This commit is contained in:
@@ -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
|
||||
;;
|
||||
|
||||
|
||||
2
run.sh
2
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
|
||||
|
||||
Reference in New Issue
Block a user