diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index f5672277..b8d3d729 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1368,36 +1368,36 @@ SERVICE(){ if [ "$1" = "glusterd" ]; then - for nip in "${GL_HOSTS[@]}"; do - if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then - nip='localhost ' - NCMD='' - else - NCMD="ssh root@${nip}" - fi - - if [ "${3}" != "q" ]; then - echo -en "${NM_SRVCOPTS[${2}]}ing on '$nip'... ${idsCL[Default]}" - fi - checkhost=$(CHECK_HOST ${nip}) - if [ "${checkhost}" != "false" ]; then - #$NCMD systemctl $2 $1 - if [ "${3}" = "q" ]; then - if [[ "enable,disable" = *"${2}"* ]] || [ "${1}" = "daemon-reload" ]; then - echo -e "${idsCL[Green]}OK${idsCL[Default]}" - elif [ "$(${NCMD} systemctl is-active ${1})" = "active" ]; then - echo -e "${idsCL[Green]}OK${idsCL[Default]}" - elif [ "$2" = "stop" ]; then - echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}" - else - echo -e "${idsCL[Red]}ERROR${idsCL[Default]}" - fi - fi - elif [ "${3}" != "q" ]; then - echo -e "${idsCL[Red]}Node is Down${idsCL[Default]}" - fi - - done + # for nip in "${GL_HOSTS[@]}"; do + # if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then + # nip='localhost ' + # NCMD='' + # else + # NCMD="ssh root@${nip}" + # fi + # + # if [ "${3}" != "q" ]; then + # echo -en "${NM_SRVCOPTS[${2}]}ing on '$nip'... ${idsCL[Default]}" + # fi + # checkhost=$(CHECK_HOST ${nip}) + # if [ "${checkhost}" != "false" ]; then + # #$NCMD systemctl $2 $1 + # if [ "${3}" != "q" ]; then + # if [[ "enable,disable" = *"${2}"* ]] || [ "${1}" = "daemon-reload" ]; then + # echo -e "${idsCL[Green]}OK${idsCL[Default]}" + # elif [ "$(${NCMD} systemctl is-active ${1})" = "active" ]; then + # echo -e "${idsCL[Green]}OK${idsCL[Default]}" + # elif [ "$2" = "stop" ]; then + # echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}" + # else + # echo -e "${idsCL[Red]}ERROR${idsCL[Default]}" + # fi + # fi + # elif [ "${3}" != "q" ]; then + # echo -e "${idsCL[Red]}Node is Down${idsCL[Default]}" + # fi + # + # done if [ "${2}" = "start" ] || [ "${2}" = "restart" ]; then