mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 14:09:17 +03:00
nixos/postgresql: escape initdbArgs
It doesn't look correct that this isn't the case already.
This commit is contained in:
parent
0e78dc369c
commit
11d1f8776c
3 changed files with 6 additions and 3 deletions
|
@ -187,7 +187,7 @@ $ nix-instantiate --eval -A postgresql_13.psqlSchema
|
|||
```
|
||||
For an upgrade, a script like this can be used to simplify the process:
|
||||
```nix
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
(let
|
||||
|
@ -211,7 +211,7 @@ For an upgrade, a script like this can be used to simplify the process:
|
|||
|
||||
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
|
||||
cd "$NEWDATA"
|
||||
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA" ${builtins.concatStringsSep " " cfg.initdbArgs}
|
||||
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA" ${lib.escapeShellArgs cfg.initdbArgs}
|
||||
|
||||
sudo -u postgres $NEWBIN/pg_upgrade \
|
||||
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue