Skip to content

@grantm /start-es.sh
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Launch ES with ulimit raise for more filehandles
#!/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.