Update nodemgmt-scripts.sh
This commit is contained in:
@@ -1196,7 +1196,7 @@ SERVICES(){
|
||||
}
|
||||
|
||||
SERVICE(){
|
||||
if [ "${3}" != "q"]; then
|
||||
if [ "${3}" != "q" ]; then
|
||||
if [ "${NM_SERVICES[${1}]}" = "" ]; then
|
||||
echo -e "${idsCL[Red]}(${1}) is not an allowed service.${idsCL[Default]}"
|
||||
exit 1
|
||||
@@ -1229,11 +1229,11 @@ SERVICE(){
|
||||
else
|
||||
NCMD="ssh root@${nip}"
|
||||
fi
|
||||
if [ "${3}" != "q"]; then
|
||||
if [ "${3}" != "q" ]; then
|
||||
echo -en "${NM_SRVCOPTS[${2}]}ing on ${NM_NODETYPES[$NTYPE]}-Node${nid} ($nip)... ${idsCL[Default]}"
|
||||
fi
|
||||
$NCMD systemctl $2 $1
|
||||
if [ "${3}" != "q"]; then
|
||||
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
|
||||
@@ -1249,7 +1249,7 @@ SERVICE(){
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${3}" != "q"]; then
|
||||
if [ "${3}" != "q" ]; then
|
||||
echo
|
||||
echo -e "${idsCL[Green]}${NM_SERVICES[${1}]} has been ${NM_SRVCOPTS[${2}]}ed${idsCL[Default]}"
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user