e8a1c7a53f
Creating the unit using default settings early on and then changing it during network_plugin section leads to too many docker restarts and duplicated code. Reversed Wants= dependence on docker.service so it does not restart docker when reloading systemd Consolidated all docker restart handlers.
16 lines
411 B
Django/Jinja
16 lines
411 B
Django/Jinja
[Unit]
|
|
Description=Weave Network
|
|
Documentation=http://docs.weave.works/weave/latest_release/
|
|
Wants=docker.socket
|
|
After=docker.service docker.socket
|
|
|
|
[Service]
|
|
EnvironmentFile=-/etc/weave.env
|
|
ExecStartPre={{ bin_dir }}/weave launch-router \
|
|
$WEAVE_SUBNET \
|
|
$WEAVE_PEERS
|
|
ExecStart=/usr/bin/docker attach weave
|
|
ExecStop={{ bin_dir }}/weave stop-router
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|