Update nodemgmt-scripts.sh
This commit is contained in:
@@ -77,12 +77,27 @@ case "$1" in
|
|||||||
#fi
|
#fi
|
||||||
STA="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"
|
STA="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"
|
||||||
echo -e "${idsCL[LightBlue]}[[${SER} ${STA}ing]]${idsCL[Default]}"
|
echo -e "${idsCL[LightBlue]}[[${SER} ${STA}ing]]${idsCL[Default]}"
|
||||||
echo -e "${idsCL[Cyan]}${STA}ing Node 1...${idsCL[Default]}"
|
|
||||||
|
echo -en "${idsCL[Cyan]}${STA}ing 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}ing Node 2...${idsCL[Default]}"
|
if [[ $(ssh root@10.5.10.51 ps -ef | grep -c xyz) -ne 1 ]]; then
|
||||||
|
echo -en "${idsCL[Cyan]}${STA}ing Node 1... ${idsCL[Green]}OK${idsCL[Default]}"
|
||||||
|
else echo -en "${idsCL[Cyan]}${STA}ing Node 1... ${idsCL[Red]}ERROR${idsCL[Default]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -en "${idsCL[Cyan]}${STA}ing Node 3...${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}ing Node 3...${idsCL[Default]}"
|
if [[ $(ssh root@10.5.10.52 ps -ef | grep -c xyz) -ne 1 ]]; then
|
||||||
|
echo -en "${idsCL[Cyan]}${STA}ing Node 1... ${idsCL[Green]}OK${idsCL[Default]}"
|
||||||
|
else echo -en "${idsCL[Cyan]}${STA}ing Node 1... ${idsCL[Red]}ERROR${idsCL[Default]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -en "${idsCL[Cyan]}${STA}ing Node 3...${idsCL[Default]}"
|
||||||
ssh root@10.5.10.53 systemctl $3 $2
|
ssh root@10.5.10.53 systemctl $3 $2
|
||||||
|
if [[ $(ssh root@10.5.10.53 ps -ef | grep -c xyz) -ne 1 ]]; then
|
||||||
|
echo -en "${idsCL[Cyan]}${STA}ing Node 1... ${idsCL[Green]}OK${idsCL[Default]}"
|
||||||
|
else echo -en "${idsCL[Cyan]}${STA}ing Node 1... ${idsCL[Red]}ERROR${idsCL[Default]}"
|
||||||
|
fi
|
||||||
echo -e "${idsCL[Green]}${SER} has been ${STA}ed${idsCL[Default]}"
|
echo -e "${idsCL[Green]}${SER} has been ${STA}ed${idsCL[Default]}"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user