mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Merge pull request #1322 from jordansissel/fix-sysv-init
Correctly set nice and ulimit -n
This commit is contained in:
commit
7be12796bf
1 changed files with 5 additions and 2 deletions
|
@ -49,10 +49,13 @@ start() {
|
|||
|
||||
JAVA_OPTS=${LS_JAVA_OPTS}
|
||||
export PATH HOME JAVA_OPTS LS_HEAP_SIZE LS_JAVA_OPTS LS_USE_GC_LOGGING
|
||||
|
||||
# set ulimit as (root, presumably) first, before we drop privileges
|
||||
ulimit -n ${LS_OPEN_FILES}
|
||||
|
||||
# Run the program!
|
||||
chroot --userspec $LS_USER:$LS_GROUP / sh -c "
|
||||
nice -n ${LS_NICE} chroot --userspec $LS_USER:$LS_GROUP / sh -c "
|
||||
cd $LS_HOME
|
||||
nice ${LS_NICE}
|
||||
ulimit -n ${LS_OPEN_FILES}
|
||||
exec \"$program\" $args
|
||||
" > "${LS_LOG_DIR}/$name.stdout" 2> "${LS_LOG_DIR}/$name.err" &
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue