Marc-Antoine Perennou | f825580 | 2013-02-13 09:28:50 +0100 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=HAProxy Load Balancer |
Ryan O'Hara | f49a604 | 2020-06-15 11:34:54 -0500 | [diff] [blame] | 3 | After=network-online.target |
| 4 | Wants=network-online.target |
Marc-Antoine Perennou | f825580 | 2013-02-13 09:28:50 +0100 | [diff] [blame] | 5 | |
| 6 | [Service] |
Apollon Oikonomopoulos | b060148 | 2019-05-06 13:00:52 +0200 | [diff] [blame] | 7 | EnvironmentFile=-/etc/default/haproxy |
William Lallemand | eaa4555 | 2019-05-07 14:00:33 +0200 | [diff] [blame] | 8 | EnvironmentFile=-/etc/sysconfig/haproxy |
Tim Duesterhus | eaa4b8a | 2019-05-06 13:00:53 +0200 | [diff] [blame] | 9 | Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock" |
William Lallemand | 0857f96 | 2021-08-20 23:29:53 +0200 | [diff] [blame] | 10 | ExecStartPre=@SBINDIR@/haproxy -Ws -f $CONFIG -c -q $EXTRAOPTS |
Apollon Oikonomopoulos | b060148 | 2019-05-06 13:00:52 +0200 | [diff] [blame] | 11 | ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS |
William Lallemand | dd8bec3 | 2021-07-26 11:03:54 +0200 | [diff] [blame] | 12 | ExecReload=@SBINDIR@/haproxy -Ws -f $CONFIG -c -q $EXTRAOPTS |
Marc-Antoine Perennou | f825580 | 2013-02-13 09:28:50 +0100 | [diff] [blame] | 13 | ExecReload=/bin/kill -USR2 $MAINPID |
Apollon Oikonomopoulos | 74f0169 | 2014-10-08 15:14:41 +0300 | [diff] [blame] | 14 | KillMode=mixed |
Marc-Antoine Perennou | f825580 | 2013-02-13 09:28:50 +0100 | [diff] [blame] | 15 | Restart=always |
Vincent Bernat | 3b479bd | 2018-06-22 20:57:03 +0200 | [diff] [blame] | 16 | SuccessExitStatus=143 |
Tim Duesterhus | d6942c8 | 2017-11-20 15:58:35 +0100 | [diff] [blame] | 17 | Type=notify |
Marc-Antoine Perennou | f825580 | 2013-02-13 09:28:50 +0100 | [diff] [blame] | 18 | |
Tim Duesterhus | 1ce8de2 | 2018-02-27 20:19:03 +0100 | [diff] [blame] | 19 | # The following lines leverage SystemD's sandboxing options to provide |
| 20 | # defense in depth protection at the expense of restricting some flexibility |
| 21 | # in your setup (e.g. placement of your configuration files) or possibly |
| 22 | # reduced performance. See systemd.service(5) and systemd.exec(5) for further |
| 23 | # information. |
| 24 | |
Tim Duesterhus | 8a96592 | 2018-02-27 20:19:04 +0100 | [diff] [blame] | 25 | # NoNewPrivileges=true |
| 26 | # ProtectHome=true |
| 27 | # If you want to use 'ProtectSystem=strict' you should whitelist the PIDFILE, |
| 28 | # any state files and any other files written using 'ReadWritePaths' or |
| 29 | # 'RuntimeDirectory'. |
| 30 | # ProtectSystem=true |
| 31 | # ProtectKernelTunables=true |
| 32 | # ProtectKernelModules=true |
| 33 | # ProtectControlGroups=true |
Tim Duesterhus | 2788a39 | 2018-02-27 20:19:05 +0100 | [diff] [blame] | 34 | # If your SystemD version supports them, you can add: @reboot, @swap, @sync |
| 35 | # SystemCallFilter=~@cpu-emulation @keyring @module @obsolete @raw-io |
Tim Duesterhus | 8a96592 | 2018-02-27 20:19:04 +0100 | [diff] [blame] | 36 | |
Marc-Antoine Perennou | f825580 | 2013-02-13 09:28:50 +0100 | [diff] [blame] | 37 | [Install] |
| 38 | WantedBy=multi-user.target |