Re: HAProxy Hot Reconfiguration with s6

From: Colin Booth <cathexis_at_gmail.com>
Date: Thu, 19 May 2016 07:03:26 -0700

On May 19, 2016 1:30 AM, "Roger Pate" <roger_at_qxxy.com> wrote:
>
> I don't know HAProxy, but if you want to run from reload.sh without
> daemonizing, would this work?
>
> reload.sh:
> #!/bin/sh
> echo $$ > /tmp/haproxy.pid
> exec /usr/sbin/haproxy \
> -f /etc/haproxy/haproxy.cfg \
> -f /opt/haproxy-config/combined.cfg \
> -db \
> -sf $(sv s /opt/zsv/jboss/haproxy | awk '{print
substr($4,1,length($4)-1)}')

Yup, that would work too. Something I forgot to mention is that -db sends
logging to stdout so you'd need to suitably redirect your output during the
interstitial step but there's nothing particularly wrong with the $$ and
exec approach.

Cheers!
Received on Thu May 19 2016 - 14:03:26 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC