Skip to content

Commit 56dc1d5

Browse files
committed
Use RequiresMountsFor on datadir
It is quite common for the data directory to be on its own mount. Systemd can ensure a directory is mounted before a service starts using RequiresMountsFor[1]: > Takes a space-separated list of absolute paths. Automatically adds > dependencies of type Requires= and After= for all mount units required > to access the specified path. [1]: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#RequiresMountsFor=
1 parent a04ab92 commit 56dc1d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

templates/systemd-override.conf.epp

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
Stdlib::Absolutepath $datadir,
44
Optional[String[1]] $extra_systemd_config,
55
| -%>
6+
[Unit]
7+
RequiresMountsFor=<%= $datadir %>
8+
69
[Service]
710
Environment=PGPORT=<%= $port %>
811
<%- if $facts['os']['family'] == 'Gentoo' { -%>

0 commit comments

Comments
 (0)