diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-11-21 10:25:43 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-11-21 10:25:43 +0100 |
commit | 9002427b960e1e2799ef781cda91d728ca0f178e (patch) | |
tree | dee8e6ea1adf20dafe8013a981cd700344e63520 | |
parent | Updated .gitignore. (diff) | |
download | newspipe-9002427b960e1e2799ef781cda91d728ca0f178e.tar.gz newspipe-9002427b960e1e2799ef781cda91d728ca0f178e.tar.bz2 newspipe-9002427b960e1e2799ef781cda91d728ca0f178e.zip |
Fixed Vagrant bootstrap.sh file.
-rw-r--r-- | vagrant/bootstrap.sh | 11 |
1 files changed, 6 insertions, 5 deletions
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
|