Skip to content

Commit 425af32

Browse files
committed
Add systemd-less, container usage to readme
1 parent dd509d6 commit 425af32

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ If your distribution doesn't include this
3636
script with PostgreSQL and you are using this on your own, please update
3737
`etc/postgresql-setup/upgrade/postgresql.conf` to reflect your setup.
3838

39+
### Running without systemd/init system
40+
Your setup might not include systemd as the init system or include any
41+
init system at all. This would be the case in most of the base container images
42+
for example. This script will try to compensate by parsing systemd
43+
service file in preconfigured path directly. By default the path is
44+
`/lib/systemd/system`.
45+
46+
If there is no systemd service file, or for whatever reason the script is unable
47+
to find valid PostgreSQL data directory, you can still provide PostgreSQL data
48+
directory path manually by using `--datadir` argument. For example when
49+
initializing new data directory use `./postgresql-setup --initdb --datadir=/my/path`.
50+
51+
This feature is most beneficial when using this script inside container images,
52+
as it gives you the most control with least dependencies.
53+
3954
## Maintainer notes
4055
Be careful about paths. Your might need to tweak paths either in configure
4156
files, or in code based on your environment.

0 commit comments

Comments
 (0)