Skip to content

Commit

Permalink
Update after Alexander review
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrx committed May 7, 2015
1 parent e5e9e69 commit c283718
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/reference/setup/repositories.asciidoc
Expand Up @@ -51,13 +51,22 @@ Run apt-get update and the repository is ready for use. You can install it with:
sudo apt-get update && sudo apt-get install elasticsearch
--------------------------------------------------

Configure Elasticsearch to automatically start during bootup:
Configure Elasticsearch to automatically start during bootup. If your
distribution is using SysV init, then you will need to run:

[source,sh]
--------------------------------------------------
sudo update-rc.d elasticsearch defaults 95 10
--------------------------------------------------

Otherwise if your distribution is using systemd:

[source,sh]
--------------------------------------------------
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
--------------------------------------------------

[float]
=== YUM

Expand Down
6 changes: 6 additions & 0 deletions src/packaging/common/systemd/elasticsearch.service
Expand Up @@ -24,6 +24,12 @@ ExecStart=${packaging.elasticsearch.bin.dir}/elasticsearch \
-Des.default.config=$CONF_FILE \
-Des.default.path.conf=$CONF_DIR

# Connects standard output to /dev/null
StandardOutput=null

# Connects standard error to journal
StandardError=journal

# When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143

Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/packaging/scripts/50_systemd.bats
Expand Up @@ -71,6 +71,8 @@ setup() {
[ "$status" -eq 0 ]

wait_for_elasticsearch_status

assert_file_exist "/var/run/elasticsearch/elasticsearch.pid"
}

@test "[SYSTEMD] start (running)" {
Expand Down

0 comments on commit c283718

Please sign in to comment.