From: William Lallemand Date: Fri, 16 Jan 2026 08:55:33 +0000 (+0100) Subject: MEDIUM: systemd: implement directory loading X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90c5618ed5f460fe659f21b3c7f047f400f26936;p=thirdparty%2Fhaproxy.git MEDIUM: systemd: implement directory loading Redhat-based system already use a CFGDIR variable to load configuration files from a directory, this patch implements the same feature. It now requires that /etc/haproxy/conf.d exists or the service won't be able to start. --- diff --git a/admin/systemd/haproxy.service.in b/admin/systemd/haproxy.service.in index 22a53d8aab..b5dddfb798 100644 --- a/admin/systemd/haproxy.service.in +++ b/admin/systemd/haproxy.service.in @@ -6,9 +6,9 @@ Wants=network-online.target [Service] EnvironmentFile=-/etc/default/haproxy EnvironmentFile=-/etc/sysconfig/haproxy -Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock" -ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS -ExecReload=@SBINDIR@/haproxy -Ws -f $CONFIG -c $EXTRAOPTS +Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "CFGDIR=/etc/haproxy/conf.d" "EXTRAOPTS=-S /run/haproxy-master.sock" +ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -f $CFGDIR -p $PIDFILE $EXTRAOPTS +ExecReload=@SBINDIR@/haproxy -Ws -f $CONFIG -f $CFGDIR -c $EXTRAOPTS ExecReload=/bin/kill -USR2 $MAINPID KillMode=mixed Restart=always