16 lines
716 B
Diff
16 lines
716 B
Diff
|
--- ./features/environment.py.orig 2017-09-29 14:54:22.558666638 +0200
|
||
|
+++ ./features/environment.py 2017-09-29 14:58:32.971607543 +0200
|
||
|
@@ -130,7 +130,11 @@
|
||
|
|
||
|
def stop(self, kill=False, timeout=15, postgres=False):
|
||
|
if postgres:
|
||
|
- return subprocess.call(['pg_ctl', '-D', self._data_dir, 'stop', '-mi', '-w'])
|
||
|
+ cmd = 'pg_ctl'
|
||
|
+ pgbindir = os.environ['PATRONI_POSTGRESQL_BIN_DIR']
|
||
|
+ if pgbindir is not None:
|
||
|
+ cmd = pgbindir + '/pg_ctl'
|
||
|
+ return subprocess.call([cmd, '-D', self._data_dir, 'stop', '-mi', '-w'])
|
||
|
super(PatroniController, self).stop(kill, timeout)
|
||
|
if self.watchdog:
|
||
|
self.watchdog.stop()
|