diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-05-15 08:18:34 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-05-15 08:18:34 +0200 |
commit | 79ed9bf79160aac8d18650a9c23c0bca80158b86 (patch) | |
tree | 60838dd69ea9ffacb4da68fb221f8b3831400ba9 | |
parent | Merged in jaesivsm/pyaggr3g470r (pull request #13) (diff) | |
download | newspipe-79ed9bf79160aac8d18650a9c23c0bca80158b86.tar.gz newspipe-79ed9bf79160aac8d18650a9c23c0bca80158b86.tar.bz2 newspipe-79ed9bf79160aac8d18650a9c23c0bca80158b86.zip |
Fixed some problems with the install script.
-rw-r--r-- | conf/conf.cfg-sample | 4 | ||||
-rwxr-xr-x | install.sh | 24 |
2 files changed, 15 insertions, 13 deletions
diff --git a/conf/conf.cfg-sample b/conf/conf.cfg-sample index 80afcbe3..2f30b04a 100644 --- a/conf/conf.cfg-sample +++ b/conf/conf.cfg-sample @@ -1,9 +1,9 @@ [webserver] -host = 0.0.0.0 +host = 127.0.0.1 port = 5000 secret = a secret only you know [misc] -platform_url = http://0.0.0.0:5000/ +platform_url = http://127.0.0.1:5000/ admin_email = recaptcha_public_key = recaptcha_private_key = @@ -5,11 +5,13 @@ # for Python 3. # -sudo apt-get install -y python libpq-dev python-dev python-pip build-essential git +PYTHON_VERSION="3.4" + +sudo apt-get install -y python$PYTHON_VERSION libpq-dev python$PYTHON_VERSION-dev build-essential git sudo apt-get install -y libxml2-dev libxslt1-dev # for lxml sed -i '/psycopg2/d' requirements.txt -sudo pip install --upgrade -r requirements.txt +sudo pip$PYTHON_VERSION install --upgrade -r requirements.txt # Initializes the configuration file cp conf/conf.cfg-sample conf/conf.cfg @@ -19,24 +21,24 @@ sed -i '/database/d' conf/conf.cfg sed -i '/database_url/d' conf/conf.cfg if [ "$1" == postgres ]; then - sudo apt-get install -y postgresql postgresql-server-dev-9.3 postgresql-client - sudo pip install psycopg2 - echo "127.0.0.1:5432:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass - chmod 700 ~/.pgpass + sudo apt-get install -y postgresql postgresql-server-dev-9.4 postgresql-client + sudo pip$PYTHON_VERSION install psycopg2 + echo "127.0.0.1:5433:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass + chmod 0600 ~/.pgpass sudo -u postgres createuser pgsqluser --no-superuser --createdb --no-createrole - createdb aggregator --no-password + sudo -u postgres createdb aggregator --no-password echo "ALTER USER pgsqluser WITH ENCRYPTED PASSWORD 'pgsqlpwd';" | sudo -u postgres psql echo "GRANT ALL PRIVILEGES ON DATABASE aggregator TO pgsqluser;" | sudo -u postgres psql # Add configuration lines for PostgreSQL echo '[database]' >> conf/conf.cfg - echo 'database_url = postgres://pgsqluser:pgsqlpwd@127.0.0.1:5432/aggregator' >> conf/conf.cfg + echo 'database_url = postgres://pgsqluser:pgsqlpwd@127.0.0.1:5433/aggregator' >> conf/conf.cfg elif [ "$1" == sqlite ]; then - sudo pip install pysqlite # not working with Python 3! + sudo pip$PYTHON_VERSION install pysqlite # not working with Python 3! # Add configuration lines for SQLite echo '[database]' >> conf/conf.cfg echo 'database_url = sqlite+pysqlite:///pyAggr3g470r.db' >> conf/conf.cfg fi -python manager.py db_empty -python manager.py db_create +python$PYTHON_VERSION manager.py db_empty +python$PYTHON_VERSION manager.py db_create |