EG install scripts: updates for Ubuntu 16.04 Xenial
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 27 Jul 2018 16:56:38 +0000 (09:56 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 27 Jul 2018 16:56:38 +0000 (09:56 -0700)
deployment/install-eg.sh
deployment/install-osrf.sh

index dc0937d..1618c59 100755 (executable)
@@ -6,10 +6,10 @@ DEFAULT_USER="opensrf"
 INSTALL_USER="opensrf"
 BUILDDIR="/home/${INSTALL_USER}/evergreen"
 INSTALLDIR="/srv/openils"
-BRANCH="user/jeffdavis/upgrade-310-tpac"
-STAMP_ID="rel_3_1_0"
-ALT_STAMP_IDS="3_1_0"
-VERSION="3.1.0.sitka.1"
+BRANCH="user/jeffdavis/eg314-tpac"
+STAMP_ID="rel_3_1_4"
+ALT_STAMP_IDS="3_1_4"
+VERSION="3.1.4.sitka.1"
 SITKACONF="/home/${DEFAULT_USER}/sysadmin"
 SITKACONF_BRANCH="master"
 SITKATOOLS="/root/sitka-tools"
@@ -73,9 +73,9 @@ fi
 
  
 # as root
-cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-trusty
+cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-xenial
 if [[ ! -n "$TARBALL" ]] ; then
-  cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-trusty-developer # required for web client
+  cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-xenial-developer # required for web client
 fi
 # by default, CPAN needs some manual input at this point; you can just accept all defaults
  
index e2adde0..f13bac8 100755 (executable)
@@ -13,6 +13,7 @@ WEBSOCKETD_ZIP="websocketd-${WEBSOCKETD_VERSION}-linux_amd64.zip"
 WEBSOCKETD_URL="https://github.com/joewalnes/websocketd/releases/download/v${WEBSOCKETD_VERSION}/${WEBSOCKETD_ZIP}"
 
 THISHOST=`hostname -s`
+TIMESTAMP=`date +%Y%m%d%H%M`
 
 while getopts ":pWj" opt ; do
   case $opt in
@@ -74,7 +75,7 @@ sed -i "s|__HOSTNAME__|${THISHOST}|g" /etc/apache2/apache2.conf
 
 # as root
 echo "Installing OpenSRF prerequisites for Ubuntu..."
-cd ${BUILDDIR} && make -f src/extras/Makefile.install ubuntu-trusty
+cd ${BUILDDIR} && make -f src/extras/Makefile.install ubuntu-xenial
  
 # as DEFAULT_USER
 echo "Configuring and building OpenSRF..."
@@ -117,11 +118,12 @@ ldconfig
  
 # as root
 echo "Setting up ejabberd..."
-cp ${SITKACONF}/files/etc/ejabberd/ejabberd.cfg/${HOSTNAME} /etc/ejabberd/ejabberd.cfg
-sed -i "s|__HOSTNAME__|${THISHOST}|g" /etc/ejabberd/ejabberd.cfg
-chgrp ejabberd /etc/ejabberd/ejabberd.cfg
-chmod 640 /etc/ejabberd/ejabberd.cfg
-/etc/init.d/ejabberd stop && /etc/init.d/ejabberd start
+mv /etc/ejabberd/ejabberd.yml /etc/ejabberd/ejabberd.yml.${TIMESTAMP}
+cp ${SITKACONF}/files/etc/ejabberd/ejabberd.yml/${HOSTNAME} /etc/ejabberd/ejabberd.yml
+sed -i "s|__HOSTNAME__|${THISHOST}|g" /etc/ejabberd/ejabberd.yml
+chgrp ejabberd /etc/ejabberd/ejabberd.yml
+chmod 640 /etc/ejabberd/ejabberd.yml
+systemctl stop ejabberd.service && systemctl start ejabberd.service
 if [[ ! -n "$SKIP_EJABBERD_REG" ]] ; then
   sleep 5
   ejabberdctl register router private.localhost ${PRIVATE_ROUTER_PASSWD} && \