Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Use systemd's RequiresMountsFor
Browse files Browse the repository at this point in the history
User might be interested in separating data
in ephemeral and persistent state, especially
in cloud environments, e.g. data_dir on
another disk.
  • Loading branch information
Frank Fischer authored and Frank Fischer committed Jan 17, 2019
1 parent 9823a3f commit fd8ea77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/systemd/elasticsearch.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Description=Elasticsearch-{{es_instance_name}}
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target
{# Directive 'WorkingDirectory' creates an implicit dependecy for {{es_home}}, so it can be omitted here #}
RequiresMountsFor={{ data_dirs | array_to_str(separator=' ') }} {{log_dir}} {{pid_dir}} {{conf_dir}}

[Service]
Environment=ES_HOME={{es_home}}
Expand Down

0 comments on commit fd8ea77

Please sign in to comment.