From: Daniel Golle Date: Fri, 30 Sep 2016 11:55:14 +0000 (+0200) Subject: postgresql: properly stop service X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=ce46b633e24930e72c4f2ab959723d24c6b1e663;p=openwrt-packages.git postgresql: properly stop service postmaster always detaches from procd, work around by using pg_ctl to stop the server. Signed-off-by: Daniel Golle --- diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index d4b52931a..d6e4ce58b 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=postgresql PKG_VERSION:=9.5.4 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=PostgreSQL diff --git a/libs/postgresql/files/postgresql.init b/libs/postgresql/files/postgresql.init index d17264e8f..959f3271c 100644 --- a/libs/postgresql/files/postgresql.init +++ b/libs/postgresql/files/postgresql.init @@ -65,6 +65,12 @@ reload_service() { /usr/bin/pg_ctl reload -U postgres -D "${pgdata}" -s } +stop_service() { + config_load "postgresql" + config_get pgdata config PGDATA + /usr/bin/pg_ctl stop -U postgres -D "${pgdata}" -s +} + status() { config_load "postgresql" config_get pgdata config PGDATA