aboutsummaryrefslogtreecommitdiffstats
path: root/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc
diff options
context:
space:
mode:
authorTony Hansen <tony@att.com>2017-05-15 03:08:24 +0000
committerTony Hansen <tony@att.com>2017-05-15 03:08:46 +0000
commit844a29c7570aa10775b34fe28dcc022de65fed4c (patch)
tree9cb0a2b41864ac2df388da93d7e7d07d9606cd2b /pgaas/src/stage/opt/app/pgaas/bin/repmgrdc
parent48feaffcb16e1fd5eb3ce453b99797de1bd15d7a (diff)
[DCAE-20] fix problem with config change
Change-Id: Icc27ab79997b2aed85a061fc7f4680367896d4b4 Signed-off-by: Tony Hansen <tony@att.com>
Diffstat (limited to 'pgaas/src/stage/opt/app/pgaas/bin/repmgrdc')
-rw-r--r--pgaas/src/stage/opt/app/pgaas/bin/repmgrdc14
1 files changed, 9 insertions, 5 deletions
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc b/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc
index cfbaa22..4faed6b 100644
--- a/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc
+++ b/pgaas/src/stage/opt/app/pgaas/bin/repmgrdc
@@ -12,13 +12,17 @@
# permissions and limitations under the License.
-if [ -d /usr/lib/postgresql/9.5/bin ]
-then PATH=$PATH:/usr/lib/postgresql/9.5/bin
-elif [ -d /opt/app/postgresql-9.5.2/bin ]
-then PATH=$PATH:/opt/app/postgresql-9.5.2/bin
-else echo "$0: Cannot find PostgreSQL bin" 1>&2; exit 1
+if [ -d /opt/app/postgresql-9.5.2 ]
+then PGDIR=/opt/app/postgresql-9.5.2
+elif [ -d /usr/lib/postgresql/9.6 ]
+then PGDIR=/usr/lib/postgresql/9.6
+elif [ -d /usr/lib/postgresql/9.5 ]
+then PGDIR=/usr/lib/postgresql/9.5
+else echo PostgreSQL bin directory not found 1>&2; exit 1
fi
+export PATH=$PATH:$PGDIR/bin
+
if [ -f /opt/app/postgresql-config/main/repmgr.conf ]
then CONF=/opt/app/postgresql-config/main/repmgr.conf
elif [ -f /opt/app/postgresql-config-9.5.2/main/repmgr.conf ]