1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00

Revert "postgresql: properly fix permissions issue by in postStart"

Reverting postgres superuser changes until after stable.

This reverts commit c66be6378d.
This commit is contained in:
Shea Levy 2014-04-11 19:22:43 -04:00
parent e9e60103de
commit 9b077bac58

View file

@ -225,14 +225,14 @@ in
# Wait for PostgreSQL to be ready to accept connections.
postStart =
''
while ! su -s ${pkgs.stdenv.shell} postgres -c 'psql postgres -c ""' 2> /dev/null; do
while ! psql postgres -c "" 2> /dev/null; do
if ! kill -0 "$MAINPID"; then exit 1; fi
sleep 0.1
done
if test -e "${cfg.dataDir}/.first_startup"; then
${optionalString (cfg.initialScript != null) ''
cat "${cfg.initialScript}" | su -s ${pkgs.stdenv.shell} postgres -c 'psql postgres'
cat "${cfg.initialScript}" | psql postgres
''}
rm -f "${cfg.dataDir}/.first_startup"
fi