add Angular (eg2) install steps
[sitka/sitka-tools.git] / deployment / install-eg.sh
index 834a39a..d4ad0a6 100755 (executable)
@@ -93,7 +93,10 @@ if [[ ! -n "$TARBALL" && ! -n "$SKIPWEBCLIENT" ]] ; then
     # install dependencies
     cd ${BUILDDIR}/Open-ILS/web/js/ui/default/staff/
     suwrap "npm install" ${INSTALL_USER}
-    suwrap "npm run build-prod && npm run test" ${INSTALL_USER} || { echo 'Could not install files for web-based staff client' ; exit 1; }
+    suwrap "npm run build-prod && npm run test" ${INSTALL_USER} || { echo 'Could not install files for AngularJS staff client' ; exit 1; }
+    cd ${BUILDDIR}/Open-ILS/src/eg2/
+    suwrap "npm install" ${INSTALL_USER}
+    suwrap "ng build --prod && npm run test" ${INSTALL_USER} || { echo 'Could not install files for Angular staff client' ; exit 1; }
   fi
 fi
 
@@ -152,6 +155,10 @@ if [[ -n "$UPDATEONLY" ]] ; then
     exit 0
 fi
 
+if [[ ! -n "$SKIPWEBCLIENT" ]] ; then
+    apt-get install -y nginx
+fi
+
 # Apache stuff (as root):
 APACHEFILES="/etc/apache2/mods-available/mpm_prefork.conf"
 for APACHEFILE in ${APACHEFILES}
@@ -184,8 +191,6 @@ fi
 
 # websockets config
 if [[ ! -n "$SKIPWEBCLIENT" ]] ; then
-    # use nginx proxy for websockets traffic
-    apt-get install -y nginx
     cp -b ${SITKACONF}/files/etc/nginx/sites-available/osrf-ws-http-proxy/${HOSTNAME} /etc/nginx/sites-available/osrf-ws-http-proxy
     ln -s /etc/nginx/sites-available/osrf-ws-http-proxy /etc/nginx/sites-enabled/osrf-ws-http-proxy
     rm /etc/nginx/sites-enabled/default
@@ -195,28 +200,6 @@ if [[ ! -n "$SKIPWEBCLIENT" ]] ; then
         # NOTE: this should be unnecessary if we installed OpenSRF with ./configure --with-websockets-port=443
         sed -i 's/var WEBSOCKET_PORT_SSL = 7682;/var WEBSOCKET_PORT_SSL = 443;/g' ${INSTALLDIR}/lib/javascript/$WSJSFILE
     done
-    # apache2-websockets
-    if [[ ! -n "$PROD" ]] ; then
-        if [ ! -d "/etc/apache2-websockets/ssl" ] ; then
-            cd /etc/apache2-websockets/ && ln -s /etc/apache2/ssl
-        fi
-    fi
-    if [ ! -d "/etc/apache2-websockets/includes" ] ; then
-        mkdir /etc/apache2-websockets/includes
-    fi
-    for WSINCLUDE in `ls /etc/apache2/includes` ; do
-        ln -s /etc/apache2/includes/${WSINCLUDE} /etc/apache2-websockets/includes/
-    done
-    for WSSITE in `ls /etc/apache2/sites-available` ; do
-        ln -s /etc/apache2/sites-available/${WSSITE} /etc/apache2-websockets/sites-available/
-    done
-    for WSSITEENABLED in `ls /etc/apache2/sites-enabled` ; do
-        ln -s /etc/apache2-websockets/sites-available/${WSSITEENABLED} /etc/apache2-websockets/sites-enabled/
-    done
-    if [[ -d "/etc/apache2-websockets/ssl" ]] ; then
-        rm -rf /etc/apache2-websockets/ssl
-    fi
-    cd /etc/apache2-websockets && ln -s /etc/apache2/ssl
 fi
 
 # install default crontab, if specified
@@ -226,6 +209,11 @@ if [[ -c "$CRONTAB" ]]; then
   fi
 fi
 
+# LDAP config
+if ! `diff ${SITKACONF}/files/etc/ldap/ldap.conf/${HOSTNAME} /etc/ldap/ldap.conf >/dev/null` ; then
+    cp -b --suffix=.`date +%Y-%m-%d-%H%M%S` ${SITKACONF}/files/etc/ldap/ldap.conf/${HOSTNAME} /etc/ldap/ldap.conf
+fi
+
 # set up log rotation
 if [[ ! -n "$PROD" ]] ; then
   if [ ! -f "/etc/logrotate.d/evergreen" ]