From eada187e77022f0da30884a826dc1767ba99abe8 Mon Sep 17 00:00:00 2001 From: Joseph Kogut Date: Mon, 4 Feb 2019 19:53:40 +0100 Subject: package/postgresql: change systemd service type to notify During activation, pg_ctl uses exec to start the db server, which causes the service to never finish activating when Type=forking. Upstream recommends configuring --with-systemd and using Type=notify. https://www.postgresql.org/docs/10/static/server-start.html Upstream says: When using systemd, you can use the following service unit file [...] Using Type=notify requires that the server binary was built with configure --with-systemd. Signed-off-by: Joseph Kogut Signed-off-by: Titouan Christophe Signed-off-by: Thomas Petazzoni --- package/postgresql/postgresql.mk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'package/postgresql/postgresql.mk') diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk index c4ba0daa17..fefbcf5f06 100644 --- a/package/postgresql/postgresql.mk +++ b/package/postgresql/postgresql.mk @@ -83,6 +83,14 @@ else POSTGRESQL_CONF_OPTS += --without-libxml endif +# required for postgresql.service Type=notify +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +POSTGRESQL_DEPENDENCIES += systemd +POSTGRESQL_CONF_OPTS += --with-systemd +else +POSTGRESQL_CONF_OPTS += --without-systemd +endif + define POSTGRESQL_USERS postgres -1 postgres -1 * /var/lib/pgsql /bin/sh - PostgreSQL Server endef -- cgit v1.2.3