Skip to content

Instantly share code, notes, and snippets.

@DRN88
Created May 25, 2017 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DRN88/c312450067d998b6cdbef0c4ddebe684 to your computer and use it in GitHub Desktop.
Save DRN88/c312450067d998b6cdbef0c4ddebe684 to your computer and use it in GitHub Desktop.
A haproxy systemd service to run haproxy-merge-configs.sh before starting haproxy
[Unit]
Description=HAProxy Load Balancer
After=syslog.target network.target
[Service]
EnvironmentFile=/etc/sysconfig/haproxy
ExecStartPre=/etc/haproxy/haproxy-merge-configs.sh
ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS
ExecReload=/bin/kill -USR2 $MAINPID
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment