Update nodemgmt-scripts.sh

This commit is contained in:
2019-01-30 08:36:07 -06:00
parent be93b04081
commit 0b540543c4

View File

@@ -26,13 +26,14 @@ case "$1" in
echo -e "${idsCL[Red]}(${3}) is not an allowed service action.${idsCL[Default]}" echo -e "${idsCL[Red]}(${3}) is not an allowed service action.${idsCL[Default]}"
exit 1 exit 1
fi fi
if [ "$3" = "stop" ]; then ADISP='Stopp'; if [ "$3" = "stop" ]; then ADISP='Stopp'
elif [ "$3" = "enable" ]; then ADISP='Enabl'; elif [ "$3" = "enable" ]; then ADISP='Enabl'
elif [ "$3" = "disable" ]; then ADISP='Disabl'; elif [ "$3" = "disable" ]; then ADISP='Disabl'
else ADISP="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"; fi else ADISP="$(tr '[:lower:]' '[:upper:]' <<< ${3:0:1})${3:1}"
fi
if [ "$3" = "start" ] && [ "$2" = "haproxy" ]; then TACT='restart'; else TACT="${3}"; fi if [ "$3" = "start" ] && [ "$2" = "haproxy" ]; then TACT='restart'; else TACT="${3}"; fi
echo -e "${idsCL[LightGreen]}[[${NM_SERVICES[${srvc}]} ${ADISP}ing]]${idsCL[Default]}" echo -e "${idsCL[LightGreen]}[[${NM_SERVICES[${2}]} ${ADISP}ing]]${idsCL[Default]}"
echo -e "${idsCL[LightGreen]}-------------------------------------------${idsCL[Default]}" echo -e "${idsCL[LightGreen]}-------------------------------------------${idsCL[Default]}"
nid=1 nid=1
@@ -57,7 +58,7 @@ case "$1" in
done done
echo "" echo ""
echo -e "${idsCL[Green]}${NM_SERVICES[${srvc}]} has been ${ADISP}ed${idsCL[Default]}" echo -e "${idsCL[Green]}${NM_SERVICES[${2}]} has been ${ADISP}ed${idsCL[Default]}"
echo "" echo ""
exit 0 exit 0
;; ;;