system resource limiting for slapd using ulimit
This commit is contained in:
parent
89eb4eb56b
commit
91ac19e61e
@ -202,9 +202,15 @@ function start() {
|
|||||||
if test x$SLAPD_LDAPI = xyes ; then
|
if test x$SLAPD_LDAPI = xyes ; then
|
||||||
harg="$harg ldapi:///"
|
harg="$harg ldapi:///"
|
||||||
fi
|
fi
|
||||||
|
# System resources limit.
|
||||||
|
if [ -n "$SLAPD_ULIMIT_SETTINGS" ]; then
|
||||||
|
ulimit="ulimit $SLAPD_ULIMIT_SETTINGS &>/dev/null;"
|
||||||
|
else
|
||||||
|
ulimit=""
|
||||||
|
fi
|
||||||
# Start daemons.
|
# Start daemons.
|
||||||
echo -n $"Starting $prog: "
|
echo -n $"Starting $prog: "
|
||||||
daemon --pidfile=$pidfile --check=$prog ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS
|
daemon --pidfile=$pidfile --check=$prog $ulimit ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
if [ $RETVAL -eq 0 ]; then
|
if [ $RETVAL -eq 0 ]; then
|
||||||
touch $lockfile
|
touch $lockfile
|
||||||
|
@ -25,3 +25,6 @@
|
|||||||
|
|
||||||
# Maximum allowed time to wait for slapd shutdown on 'service ldap stop' (in seconds)
|
# Maximum allowed time to wait for slapd shutdown on 'service ldap stop' (in seconds)
|
||||||
#SLAPD_SHUTDOWN_TIMEOUT=3
|
#SLAPD_SHUTDOWN_TIMEOUT=3
|
||||||
|
|
||||||
|
# Parameters to ulimit, use to change system limits for slapd
|
||||||
|
#SLAPD_ULIMIT_SETTINGS=""
|
||||||
|
Loading…
Reference in New Issue
Block a user