3
0
Fork 0
forked from mirrors/nixpkgs

nixos/hydra: fix runuser in init

This commit is contained in:
Sandro 2022-07-24 18:05:10 +02:00 committed by GitHub
parent 8f89704410
commit 87c66cbb56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -320,7 +320,7 @@ in
${optionalString haveLocalDB ''
if ! [ -e ${baseDir}/.db-created ]; then
runuser -u ${config.services.postgresql.superUser} ${config.services.postgresql.package}/bin/createuser hydra
runuser -u ${config.services.postgresql.superUser} ${config.services.postgresql.package}/bin/createdb -O hydra hydra
runuser -u ${config.services.postgresql.superUser} ${config.services.postgresql.package}/bin/createdb -- -O hydra hydra
touch ${baseDir}/.db-created
fi
echo "create extension if not exists pg_trgm" | runuser -u ${config.services.postgresql.superUser} -- ${config.services.postgresql.package}/bin/psql hydra