aboutsummaryrefslogtreecommitdiff
path: root/libs/postgresql/files
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2016-09-30 13:55:14 +0200
committerDaniel Golle <daniel@makrotopia.org>2016-10-11 01:03:27 +0200
commitce46b633e24930e72c4f2ab959723d24c6b1e663 (patch)
tree54e8ad4373cafb7519b0e7f0a897194339cb8b2d /libs/postgresql/files
parent80f63634fc38556b4e412f2874bf462086ddf94e (diff)
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 (limited to 'libs/postgresql/files')
-rw-r--r--libs/postgresql/files/postgresql.init6
1 files changed, 6 insertions, 0 deletions
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