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>
This commit is contained in:
Daniel Golle
2016-09-30 13:55:14 +02:00
parent 80f63634fc
commit ce46b633e2
2 changed files with 7 additions and 1 deletions

View File

@@ -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