Skip to content

Instantly share code, notes, and snippets.

@tobiasmcnulty
Forked from rbscott/elasticsearch.conf
Created January 22, 2012 22:07

Revisions

  1. tobiasmcnulty revised this gist Jan 23, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion elasticsearch.conf
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ stop on runlevel [016]

    respawn limit 10 5

    env ES_HOME=/opt/elasticsearch-0.18.7
    env ES_HOME=/opt/elasticsearch
    env ES_MIN_MEM=256m
    env ES_MAX_MEM=2g
    env DAEMON="${ES_HOME}/bin/elasticsearch"
  2. tobiasmcnulty revised this gist Jan 22, 2012. 1 changed file with 5 additions and 10 deletions.
    15 changes: 5 additions & 10 deletions elasticsearch.conf
    Original file line number Diff line number Diff line change
    @@ -10,19 +10,14 @@ stop on runlevel [016]

    respawn limit 10 5

    env ES_HOME=/usr/share/elasticsearch/home
    env ES_HOME=/opt/elasticsearch-0.18.7
    env ES_MIN_MEM=256m
    env ES_MAX_MEM=2g
    env DAEMON="${ES_HOME}/bin/elasticsearch"
    env DATA_DIR=/data/elasticsearch/data
    env CONFIG_DIR=/etc/elasticsearch
    env DATA_DIR="${ES_HOME}/data"
    env CONFIG_DIR="${ES_HOME}/config"
    env LOG_DIR="${ES_HOME}/logs"

    console output

    script
    if [ -f /etc/default/elasticsearch ]; then
    . /etc/default/elasticsearch
    fi

    su -s /bin/dash -c "/usr/bin/elasticsearch -f -Des.path.conf=$CONFIG_DIR -Des.path.home=$ES_HOME -Des.path.logs=$LOG_DIR -Des.path.data=$DATA_DIR -Des.path.work=$WORK_DIR" elasticsearch
    end script
    exec su -c "$DAEMON -f -Des.path.conf=$CONFIG_DIR -Des.path.home=$ES_HOME -Des.path.logs=$LOG_DIR -Des.path.data=$DATA_DIR"
  3. @rbscott rbscott revised this gist Jul 31, 2011. 1 changed file with 3 additions and 6 deletions.
    9 changes: 3 additions & 6 deletions elasticsearch.conf
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ description "ElasticSearch"

    start on (net-device-up
    and local-filesystems
    and runlevel [2345])
    and runlevel [2345])

    stop on runlevel [016]

    @@ -14,10 +14,8 @@ env ES_HOME=/usr/share/elasticsearch/home
    env ES_MIN_MEM=256m
    env ES_MAX_MEM=2g
    env DAEMON="${ES_HOME}/bin/elasticsearch"
    env LOG_DIR=/var/log/elasticsearch
    env DATA_DIR=/data/elasticsearch/data
    env WORK_DIR=/tmp/elasticsearch
    env CONFIG_FILE=/etc/elasticsearch/elasticsearch.yml
    env CONFIG_DIR=/etc/elasticsearch

    console output

    @@ -26,6 +24,5 @@ script
    . /etc/default/elasticsearch
    fi

    su -s /bin/dash -c "/usr/bin/elasticsearch -f -p $PID_FILE -Des.config=$CONFIG_FILE -Des.path.home=$ES_HOME -Des.path.logs=$LOG_DIR -Des.path.data=$DATA_DIR -Des.path.work=$WORK_DIR" elasticsearch
    fi
    su -s /bin/dash -c "/usr/bin/elasticsearch -f -Des.path.conf=$CONFIG_DIR -Des.path.home=$ES_HOME -Des.path.logs=$LOG_DIR -Des.path.data=$DATA_DIR -Des.path.work=$WORK_DIR" elasticsearch
    end script
  4. @rbscott rbscott created this gist Jul 31, 2011.
    31 changes: 31 additions & 0 deletions elasticsearch.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    # ElasticSearch Service

    description "ElasticSearch"

    start on (net-device-up
    and local-filesystems
    and runlevel [2345])

    stop on runlevel [016]

    respawn limit 10 5

    env ES_HOME=/usr/share/elasticsearch/home
    env ES_MIN_MEM=256m
    env ES_MAX_MEM=2g
    env DAEMON="${ES_HOME}/bin/elasticsearch"
    env LOG_DIR=/var/log/elasticsearch
    env DATA_DIR=/data/elasticsearch/data
    env WORK_DIR=/tmp/elasticsearch
    env CONFIG_FILE=/etc/elasticsearch/elasticsearch.yml

    console output

    script
    if [ -f /etc/default/elasticsearch ]; then
    . /etc/default/elasticsearch
    fi

    su -s /bin/dash -c "/usr/bin/elasticsearch -f -p $PID_FILE -Des.config=$CONFIG_FILE -Des.path.home=$ES_HOME -Des.path.logs=$LOG_DIR -Des.path.data=$DATA_DIR -Des.path.work=$WORK_DIR" elasticsearch
    fi
    end script