Skip to content

Commit

Permalink
fix websocket headers, fix startup script, add QUICKSTART
Browse files Browse the repository at this point in the history
  • Loading branch information
gleicon committed Feb 12, 2011
1 parent 0635f37 commit 704bbbf
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions QUICKSTART
@@ -0,0 +1,5 @@
- Install cyclone (http://github.com/fiorix/cyclone)
- run restmq_server (or collectd or syslogd, whichever you want)
- mess with the startup script if you want it running in brackground
- use supervisord to control start/stop (or god if you are into ruby)

1 change: 1 addition & 0 deletions collectd_restmq_server
Expand Up @@ -22,6 +22,7 @@ PORT=8888
LISTEN=127.0.0.1

# run in foreground, for testing
export PYTHONPATH=`dirname $0`:$PYTHONPATH
exec twistd -n collectd $*

# run in background, for production
Expand Down
2 changes: 1 addition & 1 deletion restmq/web.py
Expand Up @@ -466,7 +466,7 @@ def _disconnected(self, why, handler, queue_name):
except:
pass

def headersReceived(self, headers):
def headersReceived(self):
# for authenticated websocket clientes, the browser must set a
# cookie like this:
# document.cookie = "auth=user:password"
Expand Down
1 change: 1 addition & 0 deletions restmq_server
Expand Up @@ -25,6 +25,7 @@ SCRIPT_FOLDER=$(readlink -f $0)
SCRIPT_FOLDER=$(dirname $SCRIPT_FOLDER)

# run in foreground, for testing
export PYTHONPATH=`dirname $0`:$PYTHONPATH
cd $SCRIPT_FOLDER; exec twistd -n restmq $*

# run in background, for production
Expand Down
3 changes: 2 additions & 1 deletion syslogd_restmq_server
Expand Up @@ -20,9 +20,10 @@ REDIS_POOL=10
# server port, and interface to listen on
PORT=25000
#LISTEN=127.0.0.1
LISTEN=10.0.1.4
LISTEN=192.168.0.179

# run in foreground, for testing
export PYTHONPATH=`dirname $0`:$PYTHONPATH
exec twistd --pidfile=$PIDFILE --logfile=$LOGFILE -n syslogd $* --listen=$LISTEN

# run in background, for production
Expand Down

0 comments on commit 704bbbf

Please sign in to comment.