remove unix socket from pg
This commit is contained in:
8
lib.nix
8
lib.nix
@@ -87,7 +87,7 @@ in
|
|||||||
)
|
)
|
||||||
// config
|
// config
|
||||||
// {
|
// {
|
||||||
unix_socket_directories = "@PGHOST@";
|
unix_socket_directories = "";
|
||||||
inherit port listen_addresses;
|
inherit port listen_addresses;
|
||||||
};
|
};
|
||||||
toStr =
|
toStr =
|
||||||
@@ -113,7 +113,7 @@ in
|
|||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
package
|
package
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
pkgs.gnused
|
# pkgs.gnused
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
POSTGRES_RUN_INITIAL_SCRIPT="false"
|
POSTGRES_RUN_INITIAL_SCRIPT="false"
|
||||||
@@ -124,12 +124,12 @@ in
|
|||||||
echo "PostgreSQL initdb process completed"
|
echo "PostgreSQL initdb process completed"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
sed "s|@PGHOST@|''${PGHOST}|g" ${configFile} > "$PGDATA"/postgresql.conf
|
# sed "s|@PGHOST@|''${PGHOST}|g" ${configFile} > "$PGDATA"/postgresql.conf
|
||||||
if [[ "$POSTGRES_RUN_INITIAL_SCRIPT" == "true" ]]; then
|
if [[ "$POSTGRES_RUN_INITIAL_SCRIPT" == "true" ]]; then
|
||||||
echo
|
echo
|
||||||
echo "PostgreSQL is setting up the initial database"
|
echo "PostgreSQL is setting up the initial database"
|
||||||
echo
|
echo
|
||||||
pg_ctl -w start -o "-c unix_socket_directories=$PGHOST -c listen_addresses= -p ${builtins.toString port}"
|
pg_ctl -w start -o "-c unix_socket_directories='''' -c listen_addresses= -p ${builtins.toString port}"
|
||||||
pg_ctl -m fast -w stop
|
pg_ctl -m fast -w stop
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user