Update services.inc

This commit is contained in:
2024-01-16 22:19:50 -06:00
parent cc56c2c6ea
commit ec39658ca9

View File

@@ -117,11 +117,11 @@ SERVICE_MGMT(){
esac
shift
done
echo "SERVICE=${SERVICE['service']}"
echo "ACTION=${SERVICE['action']}"
echo "NODE=${SERVICE['node']}"
echo "NODETYPE=${SERVICE['nodetype']}"
echo "QUIET=${QUIET}"
# echo "SERVICE=${SERVICE['service']}"
# echo "ACTION=${SERVICE['action']}"
# echo "NODE=${SERVICE['node']}"
# echo "NODETYPE=${SERVICE['nodetype']}"
# echo "QUIET=${QUIET}"
if [ "${NM_SERVICE_DESC[${SERVICE['service']}]}" == "" ] && [ "${NM_SERVICE_DESC[${SERVICE['service']}]}" != "ALL" ]; then
echo -e "${idsCL[Red]}"${SERVICE['service']}" is an unknown Service.${idsCL[Default]}"
@@ -131,7 +131,7 @@ SERVICE_MGMT(){
if [ "${SERVICE['nodetype']}" == "ALL" ]; then
# NT_HOSTS=${SERVICE['nodetype']}_HOSTS[@]
# NT_HOST=${SERVICE['nodetype']}_HOSTS[0]
NT_HOST=${RNIP}
NTS=(${NM_NODE_TYPES[*]})
elif [ "${SERVICE['nodetype']}" != "" ]; then
@@ -248,16 +248,15 @@ SERVICE_MGMT(){
# if [ "${RUN_NODE_TYPE}" == "" ]; then
#
# fi
if [ "${NM_SERVICE_DESC[${SERVICE['service']}]}" = "" ]; then
echo -e "${idsCL[Red]}(${SERVICE['service']}) is not an allowed service.${idsCL[Default]}"
exit 1
fi
if [ "${NM_SRVCOPTS[${SERVICE['action']}]}" = "" ]; then
echo -e "${idsCL[Red]}(${SERVICE['action']}) is not an allowed service action.${idsCL[Default]}"
exit 1
fi
if [ ${QUIET} -eq 0 ]; then
if [ "${NM_SERVICE_DESC[${SERVICE['service']}]}" = "" ]; then
echo -e "${idsCL[Red]}(${SERVICE['service']}) is not an allowed service.${idsCL[Default]}"
exit 1
fi
if [ "${NM_SRVCOPTS[${SERVICE['action']}]}" = "" ]; then
echo -e "${idsCL[Red]}(${SERVICE['action']}) is not an allowed service action.${idsCL[Default]}"
exit 1
fi
if [ "${SERVICE['action']}" = "start" ] && [ "${SERVICE['service']}" = "haproxy" ]; then
TACT='restart'
else