Fixed BUG - Nested websockets directory and broken envvars
authorAndy Witter <awitter@georgialibraries.org>
Mon, 11 Jan 2016 21:20:36 +0000 (16:20 -0500)
committerAndy Witter <awitter@georgialibraries.org>
Mon, 11 Jan 2016 21:20:36 +0000 (16:20 -0500)
templates/setup-functions

index 01bdd99..1f74f95 100644 (file)
@@ -58,6 +58,7 @@ if apt-get update
         echo "Installing Dependencies for Apache Web Sockets for web based staff client";sleep 2
        gdebi --n libapache2-mod-websocket*.deb
        echo
+       ### Configure Apache2 Web Sockets.
        echo "Setting up Apache Web Sockets for opensrf";sleep 2
        service apache2 stop;sleep 2
        sh /usr/share/doc/apache2/examples/setup-instance websockets
@@ -66,8 +67,17 @@ if apt-get update
                echo
                echo "Websockets found copying config files..."
                sleep 2
-               mkdir -p /etc/apache2/apache2-websockets
-               cp -f $WD/websockets/* /etc/apache2/apache2-websockets
+               # mkdir -p /etc/apache2/apache2-websockets
+               cp -f $WD/websockets/* /etc/apache2-websockets
+               cat <<EOF >> /etc/apache2-websockets/envvars
+
+               ### For Opensrf
+               export OSRF_WEBSOCKET_IDLE_TIMEOUT=120
+               export OSRF_WEBSOCKET_IDLE_CHECK_INTERVAL=5
+               export OSRF_WEBSOCKET_CONFIG_FILE=/openils/conf/opensrf_core.xml
+               export OSRF_WEBSOCKET_CONFIG_CTXT=gateway
+               export OSRF_WEBSOCKET_MAX_REQUEST_WAIT_TIME=600
+EOF
        fi
        a2dismod websocket
        service apache2-websockets start