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) since Tue 2016-12-13 09:25:13 CET; 1s ago
  Process: 28736 ExecReload=/bin/kill -USR2 $MAINPID (code=exited,
status=0/SUCCESS)
  Process: 28764 ExecStartPre=/bin/sh -c /usr/local/sbin/haproxy -c -q
-- /etc/haproxy/* (code=exited, status=0/SUCCESS)
 Main PID: 28766 (sh)
   CGroup: /system.slice/haproxy.service
           ├─28766 /bin/sh -c /usr/local/sbin/haproxy-systemd-wrapper
-p /run/haproxy.pid -- /etc/haproxy/*
           ├─28769 /usr/local/sbin/haproxy-systemd-wrapper
-p /run/haproxy.pid
-- /etc/haproxy/haproxy.conf /etc/haproxy/z.conf /etc/haproxy/zz.conf
           ├─28770 /usr/local/sbin/haproxy -Ds -p /run/haproxy.pid
-- /etc/haproxy/haproxy.conf /etc/haproxy/z.conf /etc/haproxy/zz.conf
           └─28771 /usr/local/sbin/haproxy -Ds -p /run/haproxy.pid
-- /etc/haproxy/haproxy.conf /etc/haproxy/z.conf /etc/haproxy/zz.conf


Thanks,


El lun, 12-12-2016 a las 19:36 +0200, Jarno Huuskonen escribió:
> 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/*"
> > ExecStart=/bin/sh -c "/usr/local/sbin/haproxy-systemd-wrapper
> > -p /run/haproxy.pid -- /etc/haproxy/*"
> > ExecReload=/bin/kill -USR2 $MAINPID
> 
> Does the /bin/sh -c add extra process to haproxy process tree ?
> Does systemctl status haproxy that "Main PID:" belongs to
> haproxy-systemd-wrapper process and reloading config works ?
> 
> -Jarno
> 



Reply via email to