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