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-10-20 15:02:31 +08:00
|
|
|
EnvironmentFile=-/etc/etcd.env
|
2017-03-24 00:56:30 +08:00
|
|
|
ExecStart={{ bin_dir }}/etcd
|
2016-12-23 22:44:44 +08:00
|
|
|
ExecStartPre=-{{ docker_bin_dir }}/docker rm -f {{ 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
|
2017-03-30 03:22:49 +08:00
|
|
|
TimeoutStartSec=30s
|
2016-06-24 20:25:16 +08:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|