Use systemd's RequiresMountsFor
User might be interested in separating data in ephemeral and persistent state, especially in cloud environments, e.g. data_dir on another disk.
This commit is contained in:
parent
9823a3fc54
commit
fd8ea77fa4
1 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,8 @@ Description=Elasticsearch-{{es_instance_name}}
|
||||||
Documentation=http://www.elastic.co
|
Documentation=http://www.elastic.co
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
After=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]
|
[Service]
|
||||||
Environment=ES_HOME={{es_home}}
|
Environment=ES_HOME={{es_home}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue