templates/systemd-override.conf.epp
raw| 1 | <%- | |
| 2 | Stdlib::Port $port, |
| 3 | Stdlib::Absolutepath $datadir, |
| 4 | Optional[String[1]] $extra_systemd_config, |
| 5 | | -%> |
| 6 | [Unit] |
| 7 | RequiresMountsFor=<%= $datadir %> |
| 8 | |
| 9 | [Service] |
| 10 | Environment=PGPORT=<%= $port %> |
| 11 | <%- if $facts['os']['family'] == 'Gentoo' { -%> |
| 12 | Environment=DATA_DIR=<%= $datadir %> |
| 13 | <%- } else { -%> |
| 14 | Environment=PGDATA=<%= $datadir %> |
| 15 | <%- } -%> |
| 16 | <% if $extra_systemd_config { -%> |
| 17 | <%= $extra_systemd_config %> |
| 18 | <% } -%> |