Hello,
As 1.7 release allow to load multiple files from a directory: https://cbonte.github.io/haproxy-dconv/1.7/management.html -f <cfgfile|cfgdir> : adds <cfgfile> to the list of configuration files to be loaded. If <cfgdir> is a directory, all the files (and only files) it contains are added in lexical order (using LC_COLLATE=C) to the list of configuration files to be loaded ; only files with ".cfg" extension are added, only non hidden files (not prefixed with ".") are added. I think that the systemd unit can have the configuration directory instead of the path to the file for allow the same behaviour that the "-f" option provides. Thanks in advance, Regards,
From a4d0ea299144f5f2c5983b1335b8d89241f3c0ec Mon Sep 17 00:00:00 2001 From: Ricardo Fraile <rfra...@rfraile.eu> Date: Thu, 12 Jan 2017 12:29:44 +0100 Subject: [PATCH] MINOR: systemd unit works with cfgdir and cfgfile --- contrib/systemd/haproxy.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/systemd/haproxy.service.in b/contrib/systemd/haproxy.service.in index dca81a2..1986083 100644 --- a/contrib/systemd/haproxy.service.in +++ b/contrib/systemd/haproxy.service.in @@ -3,7 +3,7 @@ Description=HAProxy Load Balancer After=network.target [Service] -Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" +Environment="CONFIG=/etc/haproxy/" "PIDFILE=/run/haproxy.pid" ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f $CONFIG -p $PIDFILE ExecReload=@SBINDIR@/haproxy -f $CONFIG -c -q -- 2.1.4