forked from Mirrors/freeswitch
FS-2844: Patch debian init.d script to set ulimit values
This commit is contained in:
parent
a09bce346e
commit
0eb33e5761
|
@ -48,6 +48,24 @@ fi
|
|||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that sets ulimit values for the daemon
|
||||
#
|
||||
do_setlimits() {
|
||||
ulimit -c unlimited
|
||||
ulimit -d unlimited
|
||||
ulimit -f unlimited
|
||||
ulimit -i unlimited
|
||||
ulimit -n 999999
|
||||
ulimit -q unlimited
|
||||
ulimit -u unlimited
|
||||
ulimit -v unlimited
|
||||
ulimit -x unlimited
|
||||
ulimit -s 240
|
||||
ulimit -l unlimited
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
|
@ -59,6 +77,7 @@ do_start()
|
|||
# 2 if daemon could not be started
|
||||
start-stop-daemon -d $WORKDIR -c $USER --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
do_setlimits
|
||||
start-stop-daemon -d $WORKDIR -c $USER --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
|
||||
$FREESWITCH_PARAMS \
|
||||
|| return 2
|
||||
|
|
Loading…
Reference in New Issue