Delay haproxy 5 seconds in supervisord

supervisord

I saw this on another thread which solved delaying a process start in supervisord (delayed 5 seconds):

command=bash -c 'sleep 5 && uwsgi /etc/uwsgi.ini'

How would one do this to do the following:

command=service haproxy start

Best Answer

command=bash -c 'sleep 5 && /usr/local/sbin/haproxy -f /etc/haproxy.conf'

Change the binary location and config file above to suite your system. if you need additional settings - add to the end of the line before the '