From 0b827aff69f4a7bf165f87749cde6b2a657a52a7 Mon Sep 17 00:00:00 2001 From: mahesh-wor Date: Wed, 7 Aug 2019 12:22:30 +0545 Subject: [PATCH] added dynamic postgresql and dynamic wkhtml links --- odoo_install.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/odoo_install.sh b/odoo_install.sh index 9811920..3984621 100644 --- a/odoo_install.sh +++ b/odoo_install.sh @@ -27,19 +27,26 @@ OE_PORT="8069" #Choose the Odoo version which you want to install. For example: 10.0, 9.0, 8.0, 7.0 or saas-6. When using 'trunk' the master version will be installed. #IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 10.0 OE_VERSION="10.0" +#Specify Postgresql Version to use. +POSTGRES_VERSION="10" # Set this to True if you want to install Odoo 10 Enterprise! IS_ENTERPRISE="False" #set the superadmin password OE_SUPERADMIN="admin" OE_CONFIG="${OE_USER}-server" +# Distro Name For Wkhtmltopdf Install +RELEASE=$(cat /etc/os-release | grep VERSION_CODENAME | awk -F "=" '{print $2}') + ## ### WKHTMLTOPDF download links ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links, ## in order to have correct version of wkhtmltox installed, for a danger note refer to ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ): -WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb -WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-i386.deb + +# Install WKHTMLTOPDF according to distro version to avoid installation errors and unmet dependencies. +WKHTMLTOX_X64=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.$(echo $RELEASE)_amd64.deb +WKHTMLTOX_X32=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.$(echo $RELEASE)_i386.deb #-------------------------------------------------- # Update Server @@ -52,7 +59,11 @@ sudo apt-get upgrade -y # Install PostgreSQL Server #-------------------------------------------------- echo -e "\n---- Install PostgreSQL Server ----" -sudo apt-get install postgresql -y +#sudo apt-get install postgresql -y +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - +sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -sc)-pgdg main" > /etc/apt/sources.list.d/PostgreSQL.list' +apt-get -y update +apt-get install postgresql-$POSTGRES_VERSION -y echo -e "\n---- Creating the ODOO PostgreSQL User ----" sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true @@ -62,9 +73,9 @@ sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true #-------------------------------------------------- echo -e "\n---- Install tool packages ----" sudo apt-get install wget git python-pip gdebi-core -y - +sudo apt-get install postgresql-server-dev-$POSTGRES_VERSION -y echo -e "\n---- Install python packages ----" -sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil -y python-suds +sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil -y python-suds echo -e "\n---- Install python libraries ----" sudo pip install gdata psycogreen ofxparse XlsxWriter xlrd