commit ce46b633e24930e72c4f2ab959723d24c6b1e663
parent 80f63634fc38556b4e412f2874bf462086ddf94e
Author: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 30 Sep 2016 13:55:14 +0200
postgresql: properly stop service
postmaster always detaches from procd, work around by using
pg_ctl to stop the server.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git 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 <daniel@makrotopia.org>
PKG_LICENSE:=PostgreSQL
diff --git 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