virtual-appliance/appliances/teamplayer/start-teamplayer
Albert Hopkins f79cc8a353 Move appliances/configs/scripts to seperate directories.
Instead of having everything in the root directory, split them in seperate
directories (appliances, scripts, & configs).  This makes things a little
tidier.

Also added a now Makefile target, appliance-list, that prints a list of the
available appliances.  The split directory change made this easier.
2014-06-09 02:26:17 +00:00

29 lines
747 B
Bash
Executable File

#!/bin/sh
# this should be run as the TP_USER user
PYTHON=python
PYTHONPATH="$HOME" ; export PYTHONPATH
DJANGO_SETTINGS_MODULE="project.settings_local" ; export DJANGO_SETTINGS_MODULE
cd ~
. bin/activate
if [ ! -f "/etc/firstboot" ] ; then
$PYTHON manage.py syncdb --noinput --verbosity=0
$PYTHON manage.py collectstatic --noinput --verbosity=0
fi
# start the uwsgi daemon
uwsgi --socket TP_DB/teamplayer.sock \
--chmod=660 \
-w project.wsgi \
--uid teamplayer \
--gid teamplayer \
--pidfile TP_DB/uwsgi.pid \
--daemonize2 /var/log/teamplayer/teamplayer.log \
-T
# Start the Spin Doctor
$PYTHON manage.py spindoctor --verbosity=2 $@ >> "/var/log/teamplayer/teamplayer.log" 2>&1 &
echo $! > "TP_DB/tps.pid"