install-eg.sh: better handling of websockets re-install
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 24 Nov 2017 17:58:10 +0000 (09:58 -0800)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 24 Nov 2017 17:58:10 +0000 (09:58 -0800)
deployment/install-eg.sh

index 5deaf95..e1a7839 100755 (executable)
@@ -148,8 +148,14 @@ if [[ -n "$WEBCLIENT" ]] ; then
     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
+    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