templates/instance_service_unit.epp
raw| 1 | [Unit] |
| 2 | Description=HAProxy-<%= $title %> Load Balancer |
| 3 | After=syslog.target network.target |
| 4 | |
| 5 | [Service] |
| 6 | <% if $title == "haproxy" { -%> |
| 7 | ExecStart=<%= $wrapper %> -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid |
| 8 | <% } else { -%> |
| 9 | ExecStart=<%= $wrapper %> -f /etc/haproxy-<%= $title %>/haproxy-<%= $title %>.cfg -p /run/haproxy-<%= $title %>.pid |
| 10 | <% } -%> |
| 11 | ExecReload=/bin/kill -USR2 $MAINPID |
| 12 | |
| 13 | [Install] |
| 14 | WantedBy=multi-user.target |