f144fd1ed3
- Run docker run from script rather than directly from systemd target - Refactoring styling/templates Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
18 lines
514 B
Django/Jinja
18 lines
514 B
Django/Jinja
[Unit]
|
|
Description=etcd docker wrapper
|
|
Wants=docker.socket
|
|
After=docker.service
|
|
|
|
[Service]
|
|
User=root
|
|
PermissionsStartOnly=true
|
|
EnvironmentFile=/etc/etcd.env
|
|
ExecStart={{ bin_dir }}/etcd
|
|
ExecStartPre=-{{ docker_bin_dir }}/docker rm -f {{ etcd_member_name | default("etcd") }}
|
|
ExecReload={{ docker_bin_dir }}/docker restart {{ etcd_member_name | default("etcd") }}
|
|
ExecStop={{ docker_bin_dir }}/docker stop {{ etcd_member_name | default("etcd") }}
|
|
Restart=always
|
|
RestartSec=15s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|