Skip to content

Commit 26a3976

Browse files
committed
fix(postgres): create .first_startup file after initdb
This file is used by the postgresql-setup script to determine if it's the first time the database is being started.
1 parent 1e5255c commit 26a3976

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nix/systemModules/postgres/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ in
315315
# Initialise the database.
316316
initdb ${lib.escapeShellArgs cfg.initdbArgs}
317317
fi
318+
319+
# See postgresql-setup
320+
touch "${cfg.dataDir}/.first_startup"
321+
318322
if [ ! -f /etc/postgresql-custom/pgsodium_root.key ]; then
319323
umask 077
320324
echo "0000000000000000000000000000000000000000000000000000000000000000" > /etc/postgresql-custom/pgsodium_root.key

0 commit comments

Comments
 (0)