Created
December 16, 2017 06:26
-
-
Save wiennat/0c87a7dbe131719210ac096a934a20c4 to your computer and use it in GitHub Desktop.
haproxy unit file for ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=HAProxy Load Balancer | |
| Documentation=man:haproxy(1) | |
| Documentation=file:/usr/share/doc/haproxy/configuration.txt.gz | |
| After=network.target rsyslog.service | |
| [Service] | |
| # You can point the environment variable HAPROXY_STATS_SOCKET to a stats | |
| # socket if you want seamless reloads. | |
| EnvironmentFile=-/etc/default/haproxy | |
| Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" | |
| ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS | |
| ExecStart=/usr/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS | |
| ExecReload=/usr/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS | |
| ExecReload=/bin/kill -USR2 $MAINPID | |
| KillMode=mixed | |
| Restart=always | |
| Type=notify | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment