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
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