Re: Define path of configuration files in systemd unit

2016-12-19 Thread Ricardo Fraile
Hello Patrick, You are right, with "exec" works: # systemctl status haproxy.service -l ● haproxy.service - HAProxy Load Balancer Loaded: loaded (/etc/systemd/system/haproxy.service; enabled) Active: active (running) since Mon 2016-12-19 12:23:28 CET; 1min 17s ago Process: 25403

Re: Define path of configuration files in systemd unit

2016-12-13 Thread Patrick Hemmer
On 2016/12/13 11:14, Ricardo Fraile wrote: > Hello Jarno, > > > Yes, you are right, this is not an elegant solution, and reloading > doesn't work. This is the systemd report: > > > # systemctl status haproxy.service -l > ● haproxy.service - HAProxy Load Balancer >Loaded: loaded

Re: Define path of configuration files in systemd unit

2016-12-13 Thread Ricardo Fraile
Hello Jarno, Yes, you are right, this is not an elegant solution, and reloading doesn't work. This is the systemd report: # systemctl status haproxy.service -l ● haproxy.service - HAProxy Load Balancer Loaded: loaded (/etc/systemd/system/haproxy.service; enabled) Active: active (running)

Re: Define path of configuration files in systemd unit

2016-12-12 Thread Jarno Huuskonen
Hi Ricardo, On Mon, Dec 12, Ricardo Fraile wrote: > Yes, shell expansion did the trick, this is the working systemd unit: > > > [Unit] > Description=HAProxy Load Balancer > After=network.target > > [Service] > ExecStartPre=/bin/sh -c "/usr/local/sbin/haproxy -c -q > -- /etc/haproxy/*" >

Re: Define path of configuration files in systemd unit

2016-12-12 Thread Ricardo Fraile
Hi Jarno, Yes, shell expansion did the trick, this is the working systemd unit: [Unit] Description=HAProxy Load Balancer After=network.target [Service] ExecStartPre=/bin/sh -c "/usr/local/sbin/haproxy -c -q -- /etc/haproxy/*" ExecStart=/bin/sh -c "/usr/local/sbin/haproxy-systemd-wrapper -p

Re: Define path of configuration files in systemd unit

2016-12-12 Thread Jarno Huuskonen
Hi, On Mon, Dec 12, Ricardo Fraile wrote: > But the systemd execution is still a issue with the following unit: > > [Unit] > Description=HAProxy Load Balancer > After=network.target > > [Service] > ExecStartPre=/usr/local/sbin/haproxy -c -q -- /etc/haproxy/* >

Re: Define path of configuration files in systemd unit

2016-12-12 Thread Ricardo Fraile
Hello Willy, I modified the haproxy-systemd-wrapper with the attached patch and it works ok from the terminal: # /usr/local/sbin/haproxy-systemd-wrapper -p /run/haproxy.pid -- /etc/haproxy/* <7>haproxy-systemd-wrapper: executing /usr/local/sbin/haproxy -Ds -p /run/haproxy.pid --

Re: Define path of configuration files in systemd unit

2016-12-05 Thread Willy Tarreau
Hi Ricardo, On Mon, Dec 05, 2016 at 11:55:44AM +, Ricardo Fraile wrote: > Hello, > > Finally I found a workaround. Generate a list with all the configuration > files with a script in a ExecStartPre unit option, load the list into a > enviroment variable and pass them to the haproxy

Re: Define path of configuration files in systemd unit

2016-12-05 Thread Ricardo Fraile
De: Ricardo Fraile <rfra...@idealista.com> Enviado: miércoles, 23 de noviembre de 2016 12:43:20 Para: haproxy@formilux.org Asunto: Define path of configuration files in systemd unit Hello, I'm trying to use the "--" option for load multiple files in a syste

Define path of configuration files in systemd unit

2016-11-23 Thread Ricardo Fraile
Hello, I'm trying to use the "--" option for load multiple files in a systemd unit, using the following file: [Unit] Description=HAProxy Load Balancer After=network.target [Service] ExecStartPre=/usr/local/sbin/haproxy -c -q -- /etc/haproxy/* ExecStart=/usr/local/sbin/haproxy-systemd-wrapper