From bc5d97ef9e148f1d51f9deb9097d757c48bbe2d6 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 27 Jan 2019 21:26:35 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index d70a84c7..83c411b2 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -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