From 9002427b960e1e2799ef781cda91d728ca0f178e Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 21 Nov 2014 10:25:43 +0100 Subject: Fixed Vagrant bootstrap.sh file. --- vagrant/bootstrap.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'vagrant') diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index b77f237a..a94cdab3 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -2,7 +2,7 @@ apt-get update apt-get upgrade -apt-get install -y python python-pip git +apt-get install -y python libpq-dev python-dev python-pip git # Clone the source code of pyAggr3g470r git clone https://bitbucket.org/cedricbonhomme/pyaggr3g470r.git @@ -14,7 +14,7 @@ fi # Install all requierements cd pyaggr3g470r apt-get install -y libxml2-dev libxslt1-dev -pip install --upgrade -r requirements.txt +sudo pip install --upgrade -r requirements.txt cp conf/conf.cfg-sample conf/conf.cfg cd .. @@ -31,14 +31,15 @@ echo "GRANT ALL PRIVILEGES ON DATABASE aggregator TO vagrant;" | sudo -u postgre # Initializes the database cd pyaggr3g470r +chown -R vagrant:vagrant . sudo -u vagrant python db_create.py # start pyAggr3g470r at startup echo "#!/bin/sh -e" > /etc/rc.local -echo "su vagrant python runserver.py" >> /etc/rc.local +echo "cd /home/vagrant/pyaggr3g470r/" >> /etc/rc.local +echo "sudo -u vagrant python runserver.py &" >> /etc/rc.local echo "exit 0" >> /etc/rc.local chmod 755 /etc/rc.local -# Start the application -chown -R vagrant:vagrant .. +# Start the application. /etc/init.d/rc.local start -- cgit