list out nodes
This commit is contained in:
@@ -70,15 +70,19 @@ case "$1" in
|
|||||||
elif [ "$2" = "haproxy" ]; then SER='HAProxy'
|
elif [ "$2" = "haproxy" ]; then SER='HAProxy'
|
||||||
elif [ "$2" = "gogs" ]; then SER='Gogs'
|
elif [ "$2" = "gogs" ]; then SER='Gogs'
|
||||||
fi
|
fi
|
||||||
if [ "$3" = "start" ]; then STA='Starting'
|
if [ "$3" = "start" ]; then STA='Starting'; $STAP='Started'
|
||||||
elif [ "$3" = "stop" ]; then STA='Stopping'
|
elif [ "$3" = "stop" ]; then STA='Stopping'; $STAP='Stopped'
|
||||||
elif [ "$3" = "restart" ]; then STA='Restarting'
|
elif [ "$3" = "restart" ]; then STA='Restarting'; $STAP='Restarted'
|
||||||
elif [ "$3" = "reload" ]; then STA='Reloading'
|
elif [ "$3" = "reload" ]; then STA='Reloading'; $STAP='Reloaded'
|
||||||
fi
|
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
|
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.52 systemctl $3 $2
|
||||||
|
echo -e "${idsCL[Cyan]}${STA} Node 3...${idsCL[Default]}"
|
||||||
ssh root@10.5.10.53 systemctl $3 $2
|
ssh root@10.5.10.53 systemctl $3 $2
|
||||||
|
echo -e "${idsCL[Green]}${SER} has been ${STAP}${idsCL[Default]}"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
2
run.sh
2
run.sh
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
source /opt/idssys/nodemgmt/settings.conf
|
source /opt/idssys/nodemgmt/settings.conf
|
||||||
#echo ""
|
#echo ""
|
||||||
if [ "$1" != "backup" ]; then
|
if [ "$1" != "service1111" ]; then
|
||||||
cd /opt/idssys/defaults
|
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
|
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
|
git fetch origin master >/dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user