#!/bin/bash set -e -u function die { echo $1; exit 42; } HTTP_PORT=8000 WEBSOCKET_PORT=9000 case $# in 0) ;; 1) HTTP_PORT=$1 ;; 2) WEBSOCKET_PORT=$2 ;; *) die "Usage: $0 " ;; esac cd $(dirname $0) trap 'kill $(jobs -p)' EXIT cat <:$HTTP_PORT. If you're running on a remote computer, find the IP address and use https://:$HTTP_PORT. WARNING: Chromium will warn on self-signed certificates. Please accept the certificate and reload the app. EOF WEBSOCKET_LOG='/tmp/openface.websocket.log' printf "WebSocket Server: Logging to '%s'\n\n" $WEBSOCKET_LOG python2 simpleSSLServer.py $HTTP_PORT &> /dev/null & cd ../../ # Root OpenFace directory. ./demos/web/websocket-server.py --port $WEBSOCKET_PORT 2>&1 | tee $WEBSOCKET_LOG & wait