aboutsummaryrefslogtreecommitdiffstats
path: root/pgaas/src/stage/opt/app/pgaas/bin
diff options
context:
space:
mode:
Diffstat (limited to 'pgaas/src/stage/opt/app/pgaas/bin')
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/check_cluster6
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/isrw14
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/list_masters6
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote14
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/pg_ctl_restart14
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start14
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status14
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop14
-rw-r--r--pgaas/src/stage/opt/app/pgaas/bin/repmgrc14
-rw-r--r--pgaas/src/stage/opt/app/pgaas/bin/repmgrdc14
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/runpsql14
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/runpsqll14
-rw-r--r--pgaas/src/stage/opt/app/pgaas/bin/startpsql14
-rwxr-xr-xpgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw14
14 files changed, 113 insertions, 67 deletions
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/check_cluster b/pgaas/src/stage/opt/app/pgaas/bin/check_cluster
index c55d973..dbed877 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/check_cluster
+++ b/pgaas/src/stage/opt/app/pgaas/bin/check_cluster
@@ -32,7 +32,11 @@
CDF=/opt/app/cdf
if [ -d /opt/app/postgresql-9.5.2 ]
then PGDIR=/opt/app/postgresql-9.5.2
-else PGDIR=/usr/lib/postgresql/9.5
+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
if [ -d /opt/app/postgresql-config-9.5.2/ ]
then CFGDIR=/opt/app/postgresql-config-9.5.2/
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/isrw b/pgaas/src/stage/opt/app/pgaas/bin/isrw
index 817030d..d9e925e 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/isrw
+++ b/pgaas/src/stage/opt/app/pgaas/bin/isrw
@@ -13,14 +13,16 @@
# 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:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin:$PATH
+export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin:$PATH
if [ -f /var/run/postgresql/inmaintenance ]
then
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/list_masters b/pgaas/src/stage/opt/app/pgaas/bin/list_masters
index 9e22cd1..33ed79f 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/list_masters
+++ b/pgaas/src/stage/opt/app/pgaas/bin/list_masters
@@ -19,7 +19,11 @@
CDF=/opt/app/cdf
if [ -d /opt/app/postgresql-9.5.2 ]
then PGDIR=/opt/app/postgresql-9.5.2
-else PGDIR=/usr/lib/postgresql/9.5
+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
if [ -d /opt/app/postgresql-config-9.5.2/ ]
then CFGDIR=/opt/app/postgresql-config-9.5.2/
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote
index b7d011c..c976afa 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote
+++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_promote
@@ -13,11 +13,15 @@
# 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
+
pg_ctl promote -D /dbroot/pgdata/main/
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 ]
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start
index 8cb831c..d8841c8 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start
+++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_start
@@ -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 ]
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status
index 416a00e..3383835 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status
+++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_status
@@ -13,11 +13,15 @@
# 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
+
pg_ctl status -D /dbroot/pgdata/main/
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop
index 0d9a23c..4f255a8 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop
+++ b/pgaas/src/stage/opt/app/pgaas/bin/pg_ctl_stop
@@ -13,11 +13,15 @@
# 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
+
pg_ctl stop -D /dbroot/pgdata/main/
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/repmgrc b/pgaas/src/stage/opt/app/pgaas/bin/repmgrc
index 57240cf..7b1b586 100644
--- a/pgaas/src/stage/opt/app/pgaas/bin/repmgrc
+++ b/pgaas/src/stage/opt/app/pgaas/bin/repmgrc
@@ -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 ]
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 ]
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/runpsql b/pgaas/src/stage/opt/app/pgaas/bin/runpsql
index be7f705..fcb1196 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/runpsql
+++ b/pgaas/src/stage/opt/app/pgaas/bin/runpsql
@@ -13,14 +13,16 @@
# 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:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin
+export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin
[ -z "$PGUSER" ] && PGUSER=postgres
[ -z "$PGHOST" ] && PGHOST=`hostname -f`
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/runpsqll b/pgaas/src/stage/opt/app/pgaas/bin/runpsqll
index 749ae5d..864fbf8 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/runpsqll
+++ b/pgaas/src/stage/opt/app/pgaas/bin/runpsqll
@@ -13,14 +13,16 @@
# 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:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin
+export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin
[ -z "$PGUSER" ] && PGUSER=postgres
[ -z "$PGHOST" ] && PGHOST=`hostname -f`
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/startpsql b/pgaas/src/stage/opt/app/pgaas/bin/startpsql
index 5368fc8..9e5c5b4 100644
--- a/pgaas/src/stage/opt/app/pgaas/bin/startpsql
+++ b/pgaas/src/stage/opt/app/pgaas/bin/startpsql
@@ -13,14 +13,16 @@
# 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:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin
+export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin
[ -z "$PGUSER" ] && PGUSER=postgres
[ -z "$PGHOST" ] && PGHOST=`hostname -f`
diff --git a/pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw b/pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw
index 082c094..7b51b30 100755
--- a/pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw
+++ b/pgaas/src/stage/opt/app/pgaas/bin/update_var_run_isrw
@@ -13,14 +13,16 @@
# 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:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin
+export PATH=$PATH:$PGDIR/bin:/opt/java/jdk/jdk170/bin:/opt/app/cdf/bin:/opt/app/pgaas/bin
for i in 1 2 3 4 5 6
do