blob: e5d655852ccf179d9ced717e19d217ac97f4805e [file] [log] [blame]
function wait_postgres {
sudo -u postgres psql -c '\q'
while [[ "$?" != "0" ]]; do
echo Waiting for postgres to start
sleep 1
sudo -u postgres psql -c '\q'
done
}
service postgresql start
wait_postgres
service supervisor start
cd /opt/xos
PUBLIC_HOSTNAME=`./xos-config.py get server_hostname $HOSTNAME`
python manage.py runserver $PUBLIC_HOSTNAME:8000 --insecure