virtual-appliance/teamplayer/start-teamplayer

24 lines
605 B
Plaintext
Raw Normal View History

#!/bin/sh
# this should be run as the TP_USER user
PYTHONPATH="/etc/teamplayer:$PYTHONPATH"
export PYTHONPATH
cd ~
hg serve -p 8000 --prefix /repo/ > /var/log/teamplayer/hgserve.log 2>&1 &
cd ~/web
if [ ! -f "/etc/firstboot" ] ; then
python manage.py syncdb
fi
# start the fastcgi daemon
python manage.py runfcgi daemonize=true protocol=fcgi maxrequest=20 \
pidfile="TP_DB/fcgi.pid" socket=TP_DB/teamplayer.sock umask=002 \
> "/var/log/teamplayer/teamplayer.log" 2>&1
# spin!
python manage.py spin --verbosity=2 $@ > "/var/log/teamplayer/teamplayer.log" 2>&1 &
echo $! > "TP_DB/tps.pid"