Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Launch ES with ulimit raise for more filehandles

View start-es.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/bash
 
ES_BINARY=/home/grant/elasticsearch-0.18.7/bin/elasticsearch
 
if [ -z "$1" ]
then
sudo $0 as-root $USER
stty sane
elif [ "$1" = "as-root" ]
then
ORIGINAL_USER=$2
echo "Increasing ulimit"
ulimit -n 4096
su -c "$0 start-es" $ORIGINAL_USER
elif [ "$1" = "start-es" ]
then
echo "Starting ES"
$ES_BINARY &
sleep 5
else
echo "Unknown argument: '$1'"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.