Update nodemgmt-scripts.sh
This commit is contained in:
@@ -1173,10 +1173,12 @@ SERVICE(){
|
|||||||
$NCMD systemctl $2 $1
|
$NCMD systemctl $2 $1
|
||||||
if [[ "enable,disable" = *"${2}"* ]] || [ "${1}" = "daemon-reload" ]; then
|
if [[ "enable,disable" = *"${2}"* ]] || [ "${1}" = "daemon-reload" ]; then
|
||||||
echo -e "${idsCL[Green]}OK${idsCL[Default]}"
|
echo -e "${idsCL[Green]}OK${idsCL[Default]}"
|
||||||
elif [[ $(${NCMD} pgrep ${1} | wc -l) -gt "0" ]]; then
|
elif [ "$(${NCMD} systemctl is-active ${1})" != "active" ]; then
|
||||||
echo -e "${idsCL[Green]}OK${idsCL[Default]}"
|
echo -e "${idsCL[Green]}OK${idsCL[Default]}"
|
||||||
elif [ "$2" = "stop" ]; then echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}"
|
elif [ "$2" = "stop" ]; then
|
||||||
else echo -e "${idsCL[Red]}ERROR${idsCL[Default]}"
|
echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}"
|
||||||
|
else
|
||||||
|
echo -e "${idsCL[Red]}ERROR${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
nid=`expr $nid + 1`
|
nid=`expr $nid + 1`
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user