install-eg.sh: Update from latest 2.12 instructions
authortwirlip <twirlip@twirlip.org>
Tue, 7 Mar 2017 04:58:06 +0000 (20:58 -0800)
committertwirlip <twirlip@twirlip.org>
Tue, 7 Mar 2017 04:59:21 +0000 (20:59 -0800)
deployment/install-eg.sh

index c37fd10..7b29ac1 100755 (executable)
@@ -15,7 +15,7 @@ STAMP_ID="rel_2_12_beta"
 ALT_STAMP_IDS="2_12_beta"
 VERSION="2.12.beta.sitka.0"
 SITKACONF="${DEFAULT_USER_HOMEDIR}/sysadmin"
-SITKACONF_BRANCH="master"
+SITKACONF_BRANCH="eg212"
 SITKATOOLS="/root/sitka-tools"
 
 THISHOST=`hostname -s`
@@ -68,6 +68,14 @@ if [[ -n "$WEBCLIENT" ]] ; then
 fi
 # by default, CPAN needs some manual input at this point; you can just accept all defaults
  
+# web client
+if [[ -n "$WEBCLIENT" ]] ; then
+  cd ${BUILDDIR}/Open-ILS/web/js/ui/default/staff/
+  suwrap "npm install" ${INSTALL_USER}
+  suwrap "bower install" ${INSTALL_USER}
+  suwrap "grunt all" ${INSTALL_USER} || { echo 'Could not install files for web-based staff client' ; exit 1; }
+fi
+
 # as INSTALL_USER
 suwrap "cd ${BUILDDIR} && autoreconf -i" ${INSTALL_USER} # not required for release versions
 suwrap "PATH=${INSTALLDIR}/bin:\$PATH cd ${BUILDDIR} && PATH=${INSTALLDIR}/bin:\$PATH ./configure -C --prefix=${INSTALLDIR} --sysconfdir=${INSTALLDIR}/conf --with-opensrf-headers=${INSTALLDIR}/include/ --with-opensrf-libs=${INSTALLDIR}/lib/" ${INSTALL_USER}
@@ -79,12 +87,14 @@ cd ${BUILDDIR} && make STAFF_CLIENT_VERSION=${VERSION} STAFF_CLIENT_STAMP_ID=${S
 mv ${INSTALLDIR}/var/web/reports/fm_IDL.xml ${INSTALLDIR}/var/web/reports/fm_IDL.xml.orig && cp ${INSTALLDIR}/conf/fm_IDL.xml ${INSTALLDIR}/var/web/reports/
  
 # Apache stuff (as root):
-APACHEFILES="/etc/apache2/eg_vhost.conf /etc/apache2/eg_startup /etc/apache2/envvars"
+APACHEFILES="/etc/apache2/eg_vhost.conf /etc/apache2/eg_startup /etc/apache2/envvars /etc/apache2/mods-available/mpm_prefork.conf"
 for APACHEFILE in ${APACHEFILES}
 do
-  mv ${APACHEFILE} ${APACHEFILE}.`date +%Y-%m-%d-%H%M%S`
+  [[ -e "${APACHEFILE}" ]] && mv ${APACHEFILE} ${APACHEFILE}.`date +%Y-%m-%d-%H%M%S`
   cp ${SITKACONF}/files/${APACHEFILE}/${HOSTNAME} ${APACHEFILE}
 done
+a2dismod mpm_event
+a2enmod mpm_prefork
 # ensure opensrf can run Apache
 chown -R opensrf:opensrf /var/lock/apache2
 
@@ -260,11 +270,11 @@ if [ ! -e "${INSTALLDIR}/bin/update-offline-blocked-list.sh" ] ; then cp ${SITKA
 
 cp ${SITKACONF}/files${INSTALLDIR}/var/data/zips.txt/${HOSTNAME} ${INSTALLDIR}/var/data/zips.txt
 
-cp -r ${SITKATOOLS}/overdrive-eg-opac/build/* ${INSTALLDIR}/var/web/js/ui/default/opac
-ODAPI_LIBS="bc mb"
-for ODAPI_LIB in ${ODAPI_LIBS} ; do
-  cp ${SITKACONF}/files/${INSTALLDIR}/var/web/js/ui/default/opac/${ODAPI_LIB}/od_config.js ${INSTALLDIR}/var/web/js/ui/default/opac/${ODAPI_LIB}/od_config.js
-done
+#cp -r ${SITKATOOLS}/overdrive-eg-opac/build/* ${INSTALLDIR}/var/web/js/ui/default/opac
+#ODAPI_LIBS="bc mb"
+#for ODAPI_LIB in ${ODAPI_LIBS} ; do
+#  cp ${SITKACONF}/files/${INSTALLDIR}/var/web/js/ui/default/opac/${ODAPI_LIB}/od_config.js ${INSTALLDIR}/var/web/js/ui/default/opac/${ODAPI_LIB}/od_config.js
+#done
 
 # install mobile PAC
 cd ${INSTALLDIR}/var/web/opac/extras && git clone git://git.sitka.bclibraries.ca/sitka/mobile-evergreen-opac.git mobile
@@ -299,14 +309,8 @@ apt-get install -y libconfig-simple-perl libgit-repository-perl libdate-manip-pe
 # 12. paper overdue prereqs
 apt-get install -y python-reportlab python-reportlab-accel unifont
 
-# web client
+echo 'Evergreen is installed!'
 if [[ -n "$WEBCLIENT" ]] ; then
-  cd ${BUILDDIR}/Open-ILS/web/js/ui/default/staff/
-  suwrap "npm install" ${INSTALL_USER}
-  suwrap "bower install" ${INSTALL_USER}
-  suwrap "grunt all" ${INSTALL_USER}
   echo 'Remember to start the websockets service: /etc/init.d/apache2-websockets start'
 fi
 
-echo 'Evergreen is installed!'
-