2014-10-17 13:41:23 +00:00
|
|
|
[Unit]
|
|
|
|
Description=%p
|
2014-10-27 12:32:21 +00:00
|
|
|
|
|
|
|
# Requirements
|
2014-10-17 13:41:23 +00:00
|
|
|
Requires=docker.service
|
|
|
|
|
2014-10-27 12:32:21 +00:00
|
|
|
# Dependency ordering
|
|
|
|
After=docker.service
|
|
|
|
|
2014-10-17 13:41:23 +00:00
|
|
|
[Service]
|
|
|
|
Restart=always
|
|
|
|
ExecStartPre=-/usr/bin/docker kill %p
|
|
|
|
ExecStartPre=-/usr/bin/docker rm %p
|
2014-10-27 12:32:21 +00:00
|
|
|
ExecStart=/usr/bin/docker run \
|
|
|
|
--name %p \
|
|
|
|
-v /data/server-wide/postfix/:/data \
|
|
|
|
-p 25:25 \
|
|
|
|
indiehosters/postfix-forwarder
|
2014-10-17 13:41:23 +00:00
|
|
|
ExecReload=/usr/bin/docker restart %p
|
|
|
|
ExecStop=/usr/bin/docker stop %p
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|