mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-18 01:54:34 +00:00
nixos/postgresql: fix setup script
The missing () caused parts of the escripts to be added to the ExecStartPost line instead of inside the script. This caused postgresql start to fail under certain conditions.
This commit is contained in:
parent
0db9545355
commit
cee4e14bdf
@ -333,7 +333,7 @@ in
|
||||
# Wait for PostgreSQL to be ready to accept connections.
|
||||
ExecStartPost =
|
||||
let
|
||||
setupScript = pkgs.writeScript "postgresql-setup" ''
|
||||
setupScript = pkgs.writeScript "postgresql-setup" (''
|
||||
#!${pkgs.runtimeShell} -e
|
||||
|
||||
PSQL="${pkgs.utillinux}/bin/runuser -u ${cfg.superUser} -- psql --port=${toString cfg.port}"
|
||||
@ -360,7 +360,7 @@ in
|
||||
$PSQL -tAc 'GRANT ${permission} ON ${database} TO "${user.name}"'
|
||||
'') user.ensurePermissions)}
|
||||
'') cfg.ensureUsers}
|
||||
'';
|
||||
'');
|
||||
in
|
||||
"+${setupScript}";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user