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