提交 0070e75b 编写于 作者: K kohsuke

Adds parameters in /etc/default/hudson and /etc/init.d/hudson to set the

max files opened limit.
In ubuntu, the pam config for the su command does not have pam_limits.so
enabled by default.
I think a sane default for hudson would be to not rely in the
distribution or the admin of the OS to manage those settings.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23842 71c3de6d-444a-0410-be80-ed276b4c234a
上级 9011c1ba
......@@ -29,6 +29,10 @@ RUN_STANDALONE=true
HUDSON_LOG=/var/log/hudson/$NAME.log
#HUDSON_LOG=daemon.info
# OS LIMITS SETUP (disabled by default)
#MAXOPENFILES=8192
# arguments to pass to hudson.
# --javahome=$JAVA_HOME
# --httpPort=$HTTP_PORT (default 8080; disable with -1)
......
......@@ -62,6 +62,13 @@ do_start()
# 1 if daemon was already running
# 2 if daemon could not be started
$DAEMON $DAEMON_ARGS --running && return 1
# If the var MAXOPENFILES is enabled in /etc/default/hudson then set the max open files to the
# proper value
if [ -z "$MAXOPENFILES" ]; then
echo Setting up max open files limit to $MAXOPENFILES
ulimit -n $MAXOPENFILES
fi
# --user in daemon doesn't prepare environment variables like HOME, USER, LOGNAME or USERNAME,
# so we let su do so for us now
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册