3
0
Fork 0
forked from mirrors/nixpkgs

nixos/redmine: fix create role

postgresql create role no longer supports NOCREATEUSER option. See
https://www.postgresql.org/docs/9.6/static/release-9-6.html for
details.
This commit is contained in:
Robin Gloster 2017-09-13 21:54:43 +02:00
parent b0237f767e
commit f5e0e94b2a
No known key found for this signature in database
GPG key ID: D5C458DF6DD97EDF

View file

@ -191,7 +191,7 @@ in {
if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then
if ! test -e "${cfg.stateDir}/db-created"; then
psql postgres -c "CREATE ROLE redmine WITH LOGIN NOCREATEDB NOCREATEROLE NOCREATEUSER ENCRYPTED PASSWORD '${cfg.databasePassword}'"
psql postgres -c "CREATE ROLE redmine WITH LOGIN NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD '${cfg.databasePassword}'"
${config.services.postgresql.package}/bin/createdb --owner redmine redmine || true
touch "${cfg.stateDir}/db-created"
fi