From 3f9f3c3b41fb7b8c994718c4e6eb781eb5416fd0 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 27 Dec 2017 09:55:33 +1100 Subject: [PATCH] FIX: log all PG stdout/err logs to /var/log/postgres --- templates/postgres.template.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index 1f30fcf..d483b76 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -36,8 +36,14 @@ run: contents: | #!/bin/sh exec 2>&1 - echo -1000 >/proc/self/oom_score_adj HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main + - file: + path: /etc/service/postgres/log/run + chmod: "+x" + contents: | + #!/bin/sh + mkdir -p /var/log/postgres + exec svlogd /var/log/postgres - file: path: /etc/runit/3.d/99-postgres -- 2.25.1