Skip to content

Commit

Permalink
Run ulimit in the init script to prevent errors when /etc/security/…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroberts authored and Warren Bain committed Jan 29, 2015
1 parent cc5c0b0 commit ac21241
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/default/elasticsearch.init.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
# config: <%= node[:elasticsearch][:path][:conf] %>/elasticsearch.yml

# Source networking configuration
#
if [ -f /etc/sysconfig/network ]; then source /etc/sysconfig/network; fi
# Source defaults if found
if [ -f /etc/default/elasticsearch ]; then source /etc/default/elasticsearch; fi

# Set limits for environments ignoring `/etc/security/limits.d`
#
ulimit -n <%= node[:elasticsearch][:limits][:nofile] %>
ulimit -l <%= node[:elasticsearch][:limits][:memlock] %>

# Exit if networking is not up
#
[ "$NETWORKING" = "no" ] && exit
Expand Down

0 comments on commit ac21241

Please sign in to comment.