aboutsummaryrefslogtreecommitdiffstats
path: root/pgaas-post/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'pgaas-post/src/common')
-rwxr-xr-xpgaas-post/src/common/postinst41
-rwxr-xr-xpgaas-post/src/common/postrm1
2 files changed, 42 insertions, 0 deletions
diff --git a/pgaas-post/src/common/postinst b/pgaas-post/src/common/postinst
new file mode 100755
index 0000000..47b1add
--- /dev/null
+++ b/pgaas-post/src/common/postinst
@@ -0,0 +1,41 @@
+#!/bin/bash
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this code except in compliance
+# with the License. You may obtain a copy of the License
+# at http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+
+
+exec 1> /tmp/pgaas-post.out 2>&1
+set -x
+if [ -d /opt/app/postgresql-9.5.2 ]
+then export OPENECOMP=false NOTOPENECOMP=true
+else export OPENECOMP=true NOTOPENECOMP=false
+fi
+
+if $OPENECOMP
+then INSTALL_ROOT=
+fi
+
+echo STARTING $0 $(date)
+umask 0
+echo STARTING $0 $(date) >> /tmp/pgaas.inst.report
+
+if [ -d /opt/app/postgresql-9.5.2 ]
+then chmod 751 /opt/app/postgresql-9.5.2 /opt/app/postgresql-9.5.2/bin /opt/app/postgresql-9.5.2/lib
+fi
+
+/opt/app/pgaas-post/bin/pgaas-verify-install
+
+echo ENDING $0 $(date)
+echo ENDING $0 $(date) >> /tmp/pgaas.inst.report
+if $NOTOPENECOMP
+then sed -n '/^STARTING/,/^ENDING/p' `dirname $0`/../../proc_out >> /tmp/pgaas.inst.report
+fi
diff --git a/pgaas-post/src/common/postrm b/pgaas-post/src/common/postrm
new file mode 100755
index 0000000..42d2529
--- /dev/null
+++ b/pgaas-post/src/common/postrm
@@ -0,0 +1 @@
+echo STARTING $0 $(date)