Package: haproxy / 1.5.8-3+deb8u2

haproxy.service-use-environment-variables.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Author: Apollon Oikonomopoulos <apoikos@debian.org>
Description: Use the variables from /etc/default/haproxy
 This will allow seamless upgrades from the sysvinit system while respecting
 any changes the users may have made. It will also make local configuration
 easier than overriding the systemd unit file.

Last-Update: 2014-06-20
Forwarded: not-needed
Index: haproxy/contrib/systemd/haproxy.service.in
===================================================================
--- haproxy.orig/contrib/systemd/haproxy.service.in
+++ haproxy/contrib/systemd/haproxy.service.in
@@ -6,9 +6,11 @@ After=network.target syslog.service
 Wants=syslog.service
 
 [Service]
-ExecStartPre=@SBINDIR@/haproxy -f /etc/haproxy/haproxy.cfg -c -q
-ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
-ExecReload=@SBINDIR@/haproxy -c -f /etc/haproxy/haproxy.cfg
+Environment=CONFIG=/etc/haproxy/haproxy.cfg
+EnvironmentFile=-/etc/default/haproxy
+ExecStartPre=@SBINDIR@/haproxy -f ${CONFIG} -c -q
+ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f ${CONFIG} -p /run/haproxy.pid $EXTRAOPTS
+ExecReload=@SBINDIR@/haproxy -c -f ${CONFIG}
 ExecReload=/bin/kill -USR2 $MAINPID
 KillMode=mixed
 Restart=always