install-osrf.sh: install websockets by default
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 20 Apr 2018 23:05:05 +0000 (16:05 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 20 Apr 2018 23:05:05 +0000 (16:05 -0700)
deployment/install-osrf.sh

index f1eaf82..acd52ff 100755 (executable)
@@ -10,10 +10,10 @@ SITKACONF_BRANCH="master"
 
 THISHOST=`hostname -s`
 
-while getopts ":pwj" opt ; do
+while getopts ":pWj" opt ; do
   case $opt in
     p ) PROD="prod";;
-    w ) WEBSOCKETS="websockets";;
+    W ) SKIP_WEBSOCKETS="websockets";;
     j ) SKIP_EJABBERD_REG="skip_ejabberd_reg";;
   esac
 done
@@ -29,7 +29,7 @@ then
 fi
 
 # always use a proxy for websockets traffic
-if [[ -n "$WEBSOCKETS" ]] ; then
+if [[ ! -n "$SKIP_WEBSOCKETS" ]] ; then
     WSPORT="--with-websockets-port=443"
 else
     WSPORT=""
@@ -128,7 +128,7 @@ echo "OpenSRF is installed!"
 
 # websockets install (REQUIRED for web client)
 # XXX a valid SSL cert is required!
-if [[ -n "$WEBSOCKETS" ]] ; then
+if [[ ! -n "$SKIP_WEBSOCKETS" ]] ; then
   rm -r /tmp/apache-websocket
   cd /tmp && git clone https://github.com/disconnect/apache-websocket
   cd apache-websocket && apxs2 -i -a -c mod_websocket.c