Extracted startup to a new script

This commit is contained in:
Trent Bartlem 2014-11-04 09:20:52 +10:00
parent b70b32dc3a
commit 6c0942e64c
2 changed files with 18 additions and 14 deletions

View File

@ -23,21 +23,13 @@ sudo pip install --allow-external libffi-dev libffi-dev
#TODO collect user input and use that to populate the passwords #TODO collect user input and use that to populate the passwords
sudo apt-get -y install mysql-server-5.5 sudo apt-get -y install mysql-server-5.5
sudo apt-get -y install rabbitmq-server sudo apt-get -y install rabbitmq-server
sudo apt-get -y install python-xmpp #sudo apt-get -y install python-xmpp
sudo pip install -r requirements.txt sudo pip install -r requirements.txt
chmod +x startup.sh
# TODO Extract the rest of this file to separate shell script echo '--------'
echo 'This would be a good point to adjust mysql passwords, as well as all the stuff '
echo 'in ./alliance_auth/settings.py otherwise startup.sh will not work.'
echo '--------'
## comment out bootstrap_permissions() before sync, as per instructions
#cp groupmanagement/__init__.py groupmanagement/__init__.py.bak
#sed "s/bootstrap_permissions()/#bootstrap_permissions()/" groupmanagement/__init__.py.bak > groupmanagement/__init__.py
#python manage.py syncdb
#mv groupmanagement/__init__.py.bak groupmanagement/__init__.py
#python manage.py celeryd --verbosity=2 --loglevel=DEBUG
#python manage.py celerybeat --verbosity=2 --loglevel=DEBUG
#python manage.py runserver

12
startup.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
python manage.py syncdb
python manage.py shell
from util import bootstrap_permissions
from celerytask.tasks import run_alliance_corp_update
bootstrap_permissions()
run_alliance_corp_update()
python manage.py celeryd --verbosity=2 --loglevel=DEBUG
python manage.py celerybeat --verbosity=2 --loglevel=DEBUG
python manage.py runserver