install-eg.sh: Handle prod websocket config
authortwirlip <twirlip@twirlip.org>
Tue, 16 May 2017 22:06:07 +0000 (15:06 -0700)
committertwirlip <twirlip@twirlip.org>
Tue, 16 May 2017 22:06:07 +0000 (15:06 -0700)
deployment/install-eg.sh

index 8619d55..06d5bb3 100755 (executable)
@@ -138,18 +138,17 @@ if [[ -n "$WEBCLIENT" ]] ; then
         if [ ! -d "/etc/apache2-websockets/ssl" ] ; then
             cd /etc/apache2-websockets/ && ln -s /etc/apache2/ssl
         fi
-        if [ ! -d "/etc/apache2-websockets/includes" ] ; then
-            mkdir /etc/apache2-websockets/includes
-        fi
-        WSINCLUDES="498-ssl-star.catalogue.libraries.coop-include 499-rewrites.conf-include default.conf-include"
-        for WSINCLUDE in ${WSINCLUDES} ; do
-            mv ${WSINCLUDE} ${WSINCLUDE}.bak
-            ln -s /etc/apache2/includes/${WSINCLUDE} /etc/apache2-websockets/includes/
-        done
-        ln -s /etc/apache2/sites-available/499-star.catalogue.libraries.coop.conf /etc/apache2-websockets/sites-available/499-star.catalogue.libraries.coop.conf
-    else
-        echo "Don't forget to configure apache2-websockets!"
     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/
+        ln -s /etc/apache2-websockets/sites-available/${WSSITE} /etc/apache2-websockets/sites-enabled/
+    done
 fi
 
 # install default crontab, if specified