Add websockets/web client install to OpenSRF and Evergreen install scripts
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 6 Feb 2017 17:11:33 +0000 (09:11 -0800)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 6 Feb 2017 17:11:33 +0000 (09:11 -0800)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
deployment/install-eg.sh
deployment/install-osrf.sh

index 87ce433..d2f0768 100755 (executable)
@@ -27,6 +27,7 @@ while getopts ":p" opt ; do
     p ) PROD="prod";;
     e ) EDI="edi";;
     c ) CRONTAB="crontab";;
+    w ) WEBSOCKETS="websockets";;
   esac
 done
 shift $(($OPTIND - 1))
@@ -293,3 +294,15 @@ apt-get install -y libconfig-simple-perl libgit-repository-perl libdate-manip-pe
 
 # 12. paper overdue prereqs
 apt-get install -y python-reportlab python-reportlab-accel unifont
+
+# web client
+if [[ -n "$WEBSOCKETS" ]] ; then
+  cd ${BUILDDIR}/Open-ILS/web/js/ui/default/staff/
+  npm install
+  bower install
+  grunt all
+  echo 'Remember to start the websockets service: /etc/init.d/apache2-websockets start'
+fi
+
+echo 'Evergreen is installed!'
+
index 8b2f7f3..476ab91 100755 (executable)
@@ -20,6 +20,7 @@ fi
 while getopts ":p" opt ; do
   case $opt in
     p ) PROD="prod";;
+    w ) WEBSOCKETS="websockets";;
   esac
 done
 shift $(($OPTIND - 1))
@@ -111,15 +112,17 @@ echo "OpenSRF is installed!"
 
 # websockets install (REQUIRED for web client)
 # XXX a valid SSL cert is required!
-#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
-#sh /usr/share/doc/apache2/examples/setup-instance websockets
-#a2dismod websocket
-#cp ${SITKACONF}/files/etc/apache2-websockets/apache2.conf/${HOSTNAME} /etc/apache2-websockets/apache2.conf
-#cp ${SITKACONF}/files/etc/apache2-websockets/envvars/${HOSTNAME} /etc/apache2-websockets/envvars
+if [[ -n "$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
+  sh /usr/share/doc/apache2/examples/setup-instance websockets
+  a2dismod websocket
+  cp ${SITKACONF}/files/etc/apache2-websockets/apache2.conf/${HOSTNAME} /etc/apache2-websockets/apache2.conf
+  sed -i "s|__HOSTNAME__|${THISHOST}|g" /etc/apache2-websockets/apache2.conf
+  cp ${SITKACONF}/files/etc/apache2-websockets/envvars/${HOSTNAME} /etc/apache2-websockets/envvars
 
-#/etc/init.d/apache2-websockets start
-
-#echo "websockets is installed!"
+  #/etc/init.d/apache2-websockets start
 
+  #echo "websockets is installed!"
+fi