ports/net/dataplaneapi/files/dataplaneapi.in
Jesús Daniel Colmenares Oviedo 7cbccf15bd net/dataplaneapi: Fix error in GOMEMLIMIT when cgroups is not available
After starting the rc(8) script for Data Plane API, the error
"failed to set GOMEMLIMIT: cgroups is not supported on this system"
is displayed, however even though an error level is displayed it
starts successfully. However, a workaround to suppress this error,
since we do not have cgroups, is to set the 'AUTOMEMLIMIT_EXPERIMENT'
environment variable to 'system' in the rc(8) script.

PR:             288282
Reported by:    dch
Approved by:    acm (mentor)
2025-07-18 03:03:11 -04:00

29 lines
585 B
Bash

#!/bin/sh
# PROVIDE: dataplaneapi
# REQUIRE: LOGIN haproxy
# KEYWORD: shutdown
#
# Configuration settings for Data Plane API in /etc/rc.conf
#
# dataplaneapi_enable (bool): Enable Data Plane API. (default=NO)
#
. /etc/rc.subr
name="dataplaneapi"
desc="HAProxy Data Plane API"
rcvar="${name}_enable"
load_rc_config $name
: ${dataplaneapi_enable:="NO"}
dataplaneapi_env="AUTOMEMLIMIT_EXPERIMENT=system"
pidfile="/var/run/${name}.pid"
procname="%%LOCALBASE%%/bin/${name}"
command="/usr/sbin/daemon"
command_args="-c -p ${pidfile} -t \"${desc}\" ${procname}"
run_rc_command "$1"