Further updates to install scipts for Ubuntu 18.04
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 13 Nov 2020 23:42:29 +0000 (15:42 -0800)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 11 Jan 2021 20:13:02 +0000 (12:13 -0800)
deployment/install-eg.sh
deployment/install-osrf.sh

index ad0b225..e40a980 100755 (executable)
@@ -9,11 +9,11 @@ INSTALLDIR="/srv/openils"
 REPO="git+ssh://git@git.sitka.bclibraries.ca/sitka/evergreen"
 #REPO="git://git.evergreen-ils.org/working/Evergreen.git"
 #REPO="git://git.evergreen-ils.org/Evergreen.git"
-BRANCH="user/jeffdavis/upgrade-35rc-tpac"
-STAMP_ID="rel_3_5"
-VERSION="3.5.sitka.1"
+BRANCH="user/jeffdavis/eg352ish-tpac"
+STAMP_ID="rel_3_5_1"
+VERSION="3.5.1.sitka.1"
 SITKACONF="/home/${DEFAULT_USER}/sysadmin"
-SITKACONF_BRANCH="eg35"
+SITKACONF_BRANCH="ubuntu-bionic"
 SITKATOOLS="/root/sitka-tools"
 
 THISHOST=`hostname -s`
@@ -201,6 +201,7 @@ fi
 a2dismod mpm_event
 a2enmod mpm_prefork
 a2enmod headers
+a2enmod remoteip
 # ensure opensrf can run Apache
 chown -R opensrf:opensrf /var/lock/apache2
 
@@ -358,6 +359,7 @@ cp -b --suffix=.`date +%Y-%m-%d-%H%M%S` ${SITKACONF}/files${INSTALLDIR}/var/web/
 # 9. make sure opensrf owns all the stuff we just did
 echo 'managing file permissions...'
 if [[ ! -n "$PROD" ]] ; then
+  mkdir ${INSTALLDIR}/var/tmp # this would be an NFS share on prod, but it's just a normal directory for non-prod
   chown -R opensrf:opensrf ${INSTALLDIR} 2>/dev/null
 else
   for file in `ls -1 ${INSTALLDIR} | grep -v var` ; do chown -R opensrf:opensrf ${INSTALLDIR}/$file ; done
index e1ab77c..d33ac1d 100755 (executable)
@@ -7,7 +7,7 @@ INSTALLDIR="/srv/openils"
 BRANCH="user/berick/lpxxx-c-backlog-speedbump"
 HOSTNAME="nonprod"
 SITKACONF="${HOMEDIR}/sysadmin"
-SITKACONF_BRANCH="eg35"
+SITKACONF_BRANCH="ubuntu-bionic"
 
 WEBSOCKETD_VERSION="0.3.0"
 WEBSOCKETD_ZIP="websocketd-${WEBSOCKETD_VERSION}-linux_amd64.zip"
@@ -120,24 +120,24 @@ ldconfig
 # as root
 echo "Setting up ejabberd..."
 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
-#  if [[ ! -n "$PROD" ]] ; then
-#    EJABBERD_HOST="localhost"
-#  else
-#    EJABBERD_HOST=$THISHOST
-#  fi
-#  sleep 5
-#  su -c " \
-#  ejabberdctl register router private.${EJABBERD_HOST} ${PRIVATE_ROUTER_PASSWD} && \
-#  ejabberdctl register opensrf private.${EJABBERD_HOST} ${PRIVATE_OPENSRF_PASSWD} && \
-#  ejabberdctl register router public.${EJABBERD_HOST} ${PUBLIC_ROUTER_PASSWD} && \
-#  ejabberdctl register opensrf public.${EJABBERD_HOST} ${PUBLIC_OPENSRF_PASSWD} " ejabberd
-#fi
+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
+  if [[ ! -n "$PROD" ]] ; then
+    EJABBERD_HOST="localhost"
+  else
+    EJABBERD_HOST=$THISHOST
+  fi
+  sleep 5
+  su -c " \
+  ejabberdctl register router private.${EJABBERD_HOST} ${PRIVATE_ROUTER_PASSWD} && \
+  ejabberdctl register opensrf private.${EJABBERD_HOST} ${PRIVATE_OPENSRF_PASSWD} && \
+  ejabberdctl register router public.${EJABBERD_HOST} ${PUBLIC_ROUTER_PASSWD} && \
+  ejabberdctl register opensrf public.${EJABBERD_HOST} ${PUBLIC_OPENSRF_PASSWD} " ejabberd
+fi
 
 echo "OpenSRF is installed!"
 
@@ -156,4 +156,3 @@ if [[ ! -n "$SKIP_WEBSOCKETS" ]] ; then
   #echo "websockets is installed!"
 fi
 
-echo "*** IMPORTANT: you must configure ejabberd manually! ***"