On May 19, 2016 1:30 AM, "Roger Pate" <[email protected]> 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!
