2015-05-08 14:05:11 +00:00
|
|
|
[Unit]
|
|
|
|
Description=%p-%i
|
|
|
|
|
|
|
|
# Requirements
|
|
|
|
Requires=docker.service
|
|
|
|
Requires=discovery-u@%i.service
|
|
|
|
Requires=backup-u@%i.timer
|
|
|
|
|
|
|
|
# Dependency ordering
|
|
|
|
After=docker.service
|
|
|
|
Before=discovery-u@%i.service
|
|
|
|
Before=backup-u@%i.timer
|
|
|
|
|
|
|
|
[Service]
|
2015-07-15 14:58:49 +00:00
|
|
|
Restart=always
|
|
|
|
RestartSec=10
|
|
|
|
TimeoutStartSec=60
|
|
|
|
TimeoutStopSec=15
|
2015-05-08 14:05:11 +00:00
|
|
|
WorkingDirectory=/data/domains/%i/
|
|
|
|
ExecStartPre=/bin/cp /data/domains/%i/TLS/%i.pem /data/runtime/haproxy/approved-certs/%i.pem
|
|
|
|
ExecStart=/bin/bash -euxc '/data/domains/%i/RUN'
|
2015-06-09 12:18:43 +00:00
|
|
|
ExecStop=/bin/bash -euxc '/data/domains/%i/STOP'
|
2015-05-08 14:05:11 +00:00
|
|
|
|
2015-05-09 22:01:43 +00:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|