2016-06-24 20:25:16 +08:00
|
|
|
[Unit]
|
|
|
|
Description=etcd docker wrapper
|
2016-07-29 17:46:24 +08:00
|
|
|
Wants=docker.socket
|
2016-06-24 20:25:16 +08:00
|
|
|
After=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
User=root
|
|
|
|
PermissionsStartOnly=true
|
2017-03-24 00:56:30 +08:00
|
|
|
EnvironmentFile=/etc/etcd.env
|
|
|
|
ExecStart={{ bin_dir }}/etcd
|
2016-12-23 22:44:44 +08:00
|
|
|
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") }}
|
2016-06-24 20:25:16 +08:00
|
|
|
Restart=always
|
2016-07-19 21:45:37 +08:00
|
|
|
RestartSec=15s
|
2016-06-24 20:25:16 +08:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|