summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-04-11 19:22:43 -0400
committerShea Levy <shea@shealevy.com>2014-04-11 19:22:43 -0400
commit9b077bac584c3d192ea0ba5be0a93a5a5c570208 (patch)
treed1f4500493929ab040b7a0667a7340d9f8f2a57e /nixos/modules
parente9e60103de7fa4572c28d8fd1ecf5b9ed3178fb8 (diff)
downloadnixlib-9b077bac584c3d192ea0ba5be0a93a5a5c570208.tar
nixlib-9b077bac584c3d192ea0ba5be0a93a5a5c570208.tar.gz
nixlib-9b077bac584c3d192ea0ba5be0a93a5a5c570208.tar.bz2
nixlib-9b077bac584c3d192ea0ba5be0a93a5a5c570208.tar.lz
nixlib-9b077bac584c3d192ea0ba5be0a93a5a5c570208.tar.xz
nixlib-9b077bac584c3d192ea0ba5be0a93a5a5c570208.tar.zst
nixlib-9b077bac584c3d192ea0ba5be0a93a5a5c570208.zip
Revert "postgresql: properly fix permissions issue by in postStart"
Reverting postgres superuser changes until after stable.

This reverts commit c66be6378d8bbcea271b2d2102741fdda87ec8fe.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/databases/postgresql.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index 33ee7244e3f4..a83b1a110fed 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -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