fix script
This commit is contained in:
12
lib.nix
12
lib.nix
@@ -108,9 +108,14 @@ in
|
||||
)
|
||||
);
|
||||
};
|
||||
setupScript = pkgs.writeShellScriptBin "setup-postgres" ''
|
||||
set -euo pipefail
|
||||
export PATH=${package}/bin:${pkgs.coreutils}/bin
|
||||
setupScript = pkgs.writeShellApplication {
|
||||
name = "setup-postgres";
|
||||
runtimeInputs = [
|
||||
package
|
||||
pkgs.coreutils
|
||||
pkgs.gnused
|
||||
];
|
||||
text = ''
|
||||
POSTGRES_RUN_INITIAL_SCRIPT="false"
|
||||
if [[ ! -d "$PGDATA" ]]; then
|
||||
initdb --no-instructions
|
||||
@@ -134,6 +139,7 @@ in
|
||||
|
||||
unset POSTGRES_RUN_INITIAL_SCRIPT
|
||||
'';
|
||||
};
|
||||
|
||||
script = pkgs.writeShellApplication {
|
||||
name = "run-postgres";
|
||||
|
||||
Reference in New Issue
Block a user