From d19fbd3f6bd85a02d31fb824b13500f8abe2796c Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 19 Nov 2014 16:42:02 -0500 Subject: [PATCH] trusty: added -p command to install pg 9.2 server (testing pending) Signed-off-by: Bill Erickson --- installer/trusty/eg_trusty_installer.sh | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/installer/trusty/eg_trusty_installer.sh b/installer/trusty/eg_trusty_installer.sh index cf496b29b..a2fba448c 100755 --- a/installer/trusty/eg_trusty_installer.sh +++ b/installer/trusty/eg_trusty_installer.sh @@ -14,7 +14,7 @@ # GNU General Public License for more details. # ----------------------------------------------------------------------- -while getopts aystbd option +while getopts aystbdp option do case "${option}" in @@ -24,6 +24,7 @@ do t) LIVETEST=1;; b) NO_BROWSER=1;; d) NO_DATABASE=1;; + p) PG_92=1;; esac done @@ -243,10 +244,28 @@ function evergreen_db_prereqs { fi; echo _.-~= Installing Evergreen database pre-requisites date - if [ $YES ]; then - yes | make -f /home/opensrf/Evergreen/Open-ILS/src/extras/Makefile.install ${EVERGREEN_DB_PREREQ_TARGET} - else - make -f /home/opensrf/Evergreen/Open-ILS/src/extras/Makefile.install ${EVERGREEN_DB_PREREQ_TARGET} + + if [ -n "$PG_92" ]; then + # ubuntu installs 9.3 by default. + # fetch 9.2 builds directly from postgres + echo -e "\ndeb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" \ + >> /etc/apt/sources.list + wget --quiet -O - \ + https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - + apt-get update + + PG_COM="apt-get install postgresql-9.2 postgresql-contrib-9.2 postgresql-plperl-9.2 postgresql-server-dev-9.2" + if [ $YES ]; then + yes | $PG_COM + else + $PG_COM + fi; + else + if [ $YES ]; then + yes | make -f /home/opensrf/Evergreen/Open-ILS/src/extras/Makefile.install ${EVERGREEN_DB_PREREQ_TARGET} + else + make -f /home/opensrf/Evergreen/Open-ILS/src/extras/Makefile.install ${EVERGREEN_DB_PREREQ_TARGET} + fi; fi; echo Return Value = $? echo End of Installing Evergreen database pre-requisites =~-._ -- 2.11.0