From e5f25117642478bba6ae50514d948b2056417bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Albers?= Date: Mon, 4 Jun 2018 16:36:41 +0200 Subject: [PATCH] Add WorkingDirectory to systemd sample config. (#686) Otherwise `initdb` fails because it tries to create the data directory in the root directory where the postgres user has no permissions. --- extras/startup-scripts/patroni.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extras/startup-scripts/patroni.service b/extras/startup-scripts/patroni.service index 829fb64b..0be8f961 100644 --- a/extras/startup-scripts/patroni.service +++ b/extras/startup-scripts/patroni.service @@ -11,6 +11,8 @@ Type=simple User=postgres Group=postgres +WorkingDirectory=~ + # Where to send early-startup messages from the server # This is normally controlled by the global default set by systemd # StandardOutput=syslog