diff options
-rw-r--r-- | gnu/services/databases.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index d2dc5f0da8..479a3c56f7 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -205,6 +205,10 @@ host all all ::1/128 md5")) (mkdir-p #$data-directory) (chown #$data-directory (passwd:uid user) (passwd:gid user)) + ;; Create log directory + (mkdir-p "/var/log/postgresql") + (chown "/var/log/postgresql" (passwd:uid user) (passwd:gid user)) + ;; Drop privileges and init state directory in a new ;; process. Wait for it to finish before proceeding. (match (primitive-fork) @@ -247,6 +251,7 @@ host all all ::1/128 md5")) (setgid (passwd:gid user)) (setuid (passwd:uid user)) (execl pg_ctl pg_ctl "-D" #$data-directory "-o" options + "--log=/var/log/postgresql/pg_ctl" mode))))))) (pid-file (in-vicinity data-directory "postmaster.pid")) (action (lambda args |