fix script
This commit is contained in:
9
lib.nix
9
lib.nix
@@ -108,10 +108,7 @@ in
|
||||
)
|
||||
);
|
||||
};
|
||||
setupScript = pkgs.writeShellApplication {
|
||||
runtimeInputs = [ pkgs.makeWrapper ];
|
||||
name = "setup-postgres";
|
||||
text = ''
|
||||
setupScript = pkgs.writeShellScriptBin "setup-postgres" ''
|
||||
set -euo pipefail
|
||||
export PATH=${package}/bin:${pkgs.coreutils}/bin
|
||||
POSTGRES_RUN_INITIAL_SCRIPT="false"
|
||||
@@ -122,8 +119,7 @@ in
|
||||
echo "PostgreSQL initdb process completed"
|
||||
echo
|
||||
fi
|
||||
substituteAllInPlace "$PGDATA"/postgresql.conf
|
||||
cp ${configFile} "$PGDATA"/postgresql.conf
|
||||
sed "s|@PGHOST|''${PGHOST}|g" ${configFile} > "$PGDATA"/postgresql.conf
|
||||
if [[ "$POSTGRES_RUN_INITIAL_SCRIPT" == "true" ]]; then
|
||||
echo
|
||||
echo "PostgreSQL is setting up the initial database"
|
||||
@@ -138,7 +134,6 @@ in
|
||||
|
||||
unset POSTGRES_RUN_INITIAL_SCRIPT
|
||||
'';
|
||||
};
|
||||
|
||||
script = pkgs.writeShellApplication {
|
||||
name = "run-postgres";
|
||||
|
||||
Reference in New Issue
Block a user