aboutsummaryrefslogtreecommitdiffstats
path: root/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart
diff options
context:
space:
mode:
Diffstat (limited to 'pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart')
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart14
1 files changed, 9 insertions, 5 deletions
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart
index db00739..e1ad0eb 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart
+++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart
@@ -13,13 +13,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/postgresql.conf ]
then CONF=/opt/app/postgresql-config/main/postgresql.conf
elif [ -f /opt/app/postgresql-config-9.5.2/main/postgresql.conf ]