4 postgres -V | grep -q PostgreSQL && {
5 test -d /var/postgresql/data || {
8 mkdir /var/postgresql/data
9 initdb -D /var/postgresql/data -U postgres -A scram-sha-256 -E UTF8 -W
11 rcctl enable postgresql
12 rcctl start postgresql
14 node postgresql/data/pg_hba.conf &&
15 nodeinstall -m 600 -o _postgresql:_postgresql \
16 postgresql/data/pg_hba.conf /var/postgresql/data/ &&
17 rcctl restart postgresql
18 node postgresql/data/postgresql.conf &&
19 nodeinstall -m 600 -o _postgresql:_postgresql \
20 postgresql/data/postresql.conf /var/postgresql/data/ &&
21 rcctl restart postgresql