Use runuser for Zulip Postgres bootstrap
This commit is contained in:
parent
601bedcc59
commit
2ef804fa10
1 changed files with 2 additions and 2 deletions
|
|
@ -179,7 +179,7 @@ in
|
||||||
pkgs.bash
|
pkgs.bash
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
pkgs.python3
|
pkgs.python3
|
||||||
pkgs.shadow
|
pkgs.util-linux
|
||||||
];
|
];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
@ -205,7 +205,7 @@ END
|
||||||
ALTER ROLE zulip WITH LOGIN PASSWORD '$db_password_sql';
|
ALTER ROLE zulip WITH LOGIN PASSWORD '$db_password_sql';
|
||||||
SQL
|
SQL
|
||||||
|
|
||||||
${pkgs.shadow}/bin/su postgres -s ${pkgs.bash}/bin/bash -c "psql -v ON_ERROR_STOP=1 -f '$setup_sql'"
|
${pkgs.util-linux}/bin/runuser -u postgres -- psql -v ON_ERROR_STOP=1 -f "$setup_sql"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue