install-eg.sh: fix issues with nginx install, remove apache2-websockets stuff
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Wed, 16 Jan 2019 17:58:23 +0000 (09:58 -0800)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Wed, 16 Jan 2019 17:58:23 +0000 (09:58 -0800)
deployment/install-eg.sh

index 834a39a..a8e61aa 100755 (executable)
@@ -152,6 +152,10 @@ if [[ -n "$UPDATEONLY" ]] ; then
     exit 0
 fi
 
     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}
 # Apache stuff (as root):
 APACHEFILES="/etc/apache2/mods-available/mpm_prefork.conf"
 for APACHEFILE in ${APACHEFILES}
@@ -184,8 +188,6 @@ fi
 
 # websockets config
 if [[ ! -n "$SKIPWEBCLIENT" ]] ; then
 
 # 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
     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 +197,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
         # 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
 fi
 
 # install default crontab, if specified