From c9bdc25b4d117b63c7bae4a1400e0ade3cd7a41b Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 16 Sep 2014 09:18:54 +0200 Subject: postgresql-setup: don't expect /etc/postgresql/* exists That concept was against systemd intentions. From now we should stop using .include statement in service files and encourage people using the systemd's drop-in feature. That complicates things a little, at least until the rhbz#1139148 is not resolved somehow. --- postgresql.service.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'postgresql.service.in') diff --git a/postgresql.service.in b/postgresql.service.in index 4b9fc95..ace3ebb 100644 --- a/postgresql.service.in +++ b/postgresql.service.in @@ -1,7 +1,8 @@ # It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to edit configuration file /etc/postgresql/$SERVICE_NAME -# (where by default, SERVICE_NAME is postgresql). +# overwritten during package upgrades. It is recommended to use systemd +# "dropin" feature; i.e. create file with suffix .conf under +# @userunitsdir@/UNITNAME.service.d directory overriding the +# unit's defaults. Look at systemd.unit(5) manual page for more info. [Unit] Description=PostgreSQL database server @@ -13,8 +14,6 @@ Type=forking User=postgres Group=postgres -EnvironmentFile=-@PKGCONFIG_DIR@/%N - # Where to send early-startup messages from the server (before the logging # options of postgresql.conf take effect) # This is normally controlled by the global default set by systemd @@ -27,6 +26,8 @@ OOMScoreAdjust=-1000 Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj Environment=PG_OOM_ADJUST_VALUE=0 +Environment=PGDATA=@PGDATADIR@ + ExecStartPre=@libexecdir@/postgresql-check-db-dir %N # Temporarily use postgresql-ctl wrapper around pg_ctl until there will -- cgit