diff --git a/README.md b/README.md
index 45d6618a..5d830e59 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,29 @@
+# [Odoo](https://www.odoo.com "Odoo's Homepage") Install Script
+
This script is based on the install script from André Schenkels (https://github.com/aschenkels-ictstudio/openerp-install-scripts)
but goes a bit further. This script will also give you the ability to define an xmlrpc_port in the .conf file that is generated under /etc/
This script can be safely used in a multi-odoo code base server because the default Odoo port is changed BEFORE the Odoo is started.
-
Installation procedure
-1. Download the script:
+## Installation procedure
+
+##### 1. Download the script:
```
-sudo wget https://raw.githubusercontent.com/Yenthe666/InstallScript/9.0/odoo_install.sh
+sudo wget https://raw.githubusercontent.com/Yenthe666/InstallScript/All/odoo_install.sh
```
-2. Make the script executable:
+##### 2. Modify the parameters as you wish.
+There are a few things you can configure, this is the most used list:
+```OE_USER``` will be the username for the system user.
+```INSTALL_WKHTMLTOPDF``` set to ```False``` if you do not want to install it, if you want to install it you should set it to ```True```.
+```OE_PORT``` is the port where Odoo should run on, for example 8069.
+```OE_VERSION``` is the Odoo version to install, for example ```9.0``` for Odoo V9.
+```IS_ENTERPRISE``` will install the Enterprise version on top of ```9.0``` if you set it to ```True```, set it to ```False``` if you want the community version of Odoo 9.
+```OE_SUPERADMIN``` is the master password for this Odoo installation.
+
+#### 3. Make the script executable
```
sudo chmod +x odoo_install.sh
```
-3. Execute the script:
+##### 4. Execute the script:
```
sudo ./odoo_install.sh
```
diff --git a/odoo_install.sh b/odoo_install.sh
index e227a17d..b16eaa80 100644
--- a/odoo_install.sh
+++ b/odoo_install.sh
@@ -1,6 +1,6 @@
#!/bin/bash
################################################################################
-# Script for installing Odoo V9 on Ubuntu 14.04 LTS (could be used for other version too)
+# Script for installing Odoo on Ubuntu 14.04, 15.04 and 16.04 (could be used for other version too)
# Author: Yenthe Van Ginneken
#-------------------------------------------------------------------------------
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances
@@ -27,6 +27,8 @@ OE_PORT="8069"
#Choose the Odoo version which you want to install. For example: 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 9.0
OE_VERSION="9.0"
+# Set this to True if you want to install Odoo 9 Enterprise!
+IS_ENTERPRISE="False"
#set the superadmin password
OE_SUPERADMIN="admin"
OE_CONFIG="${OE_USER}-server"
@@ -36,8 +38,8 @@ OE_CONFIG="${OE_USER}-server"
## === 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=http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
-WKHTMLTOX_X32=http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-i386.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
#--------------------------------------------------
# Update Server
@@ -65,7 +67,9 @@ 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
echo -e "\n---- Install python libraries ----"
-sudo pip install gdata psycogreen ofxparse
+sudo pip install gdata psycogreen
+# This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
+sudo -H pip install suds
echo -e "\n--- Install other required packages"
sudo apt-get install node-clean-css -y
@@ -106,9 +110,26 @@ sudo chown $OE_USER:$OE_USER /var/log/$OE_USER
echo -e "\n==== Installing ODOO Server ===="
sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/odoo $OE_HOME_EXT/
-echo -e "\n---- Create custom module directory ----"
-sudo su $OE_USER -c "mkdir $OE_HOME/custom"
-sudo su $OE_USER -c "mkdir $OE_HOME/custom/addons"
+if [ $IS_ENTERPRISE = "True" ]; then
+ # Odoo Enterprise install!
+ sudo su $OE_USER -c "mkdir $OE_HOME/enterprise"
+ sudo su $OE_USER -c "mkdir $OE_HOME/enterprise/addons"
+
+ echo -e "\n---- Adding Enterprise code under $OE_HOME/enterprise/addons ----"
+ sudo git clone --depth 1 --branch 9.0 https://www.github.com/odoo/enterprise "$OE_HOME/enterprise/addons"
+
+ echo -e "\n---- Installing Enterprise specific libraries ----"
+ sudo apt-get install nodejs npm
+ sudo npm install -g less
+ sudo npm install -g less-plugin-clean-css
+
+ echo -e "\n--- Create symlink for node"
+ sudo ln -s /usr/bin/nodejs /usr/bin/node
+else
+ echo -e "\n---- Create custom module directory ----"
+ sudo su $OE_USER -c "mkdir $OE_HOME/custom"
+ sudo su $OE_USER -c "mkdir $OE_HOME/custom/addons"
+fi
echo -e "\n---- Setting permissions on home folder ----"
sudo chown -R $OE_USER:$OE_USER $OE_HOME/*
@@ -122,8 +143,12 @@ echo -e "* Change server config file"
sudo sed -i s/"db_user = .*"/"db_user = $OE_USER"/g /etc/${OE_CONFIG}.conf
sudo sed -i s/"; admin_passwd.*"/"admin_passwd = $OE_SUPERADMIN"/g /etc/${OE_CONFIG}.conf
sudo su root -c "echo 'logfile = /var/log/$OE_USER/$OE_CONFIG$1.log' >> /etc/${OE_CONFIG}.conf"
-sudo su root -c "echo 'addons_path=$OE_HOME_EXT/addons,$OE_HOME/custom/addons' >> /etc/${OE_CONFIG}.conf"
-
+if [ $IS_ENTERPRISE = "True" ]; then
+ sudo su root -c "echo 'addons_path=$OE_HOME/enterprise/addons,$OE_HOME_EXT/addons' >> /etc/${OE_CONFIG}.conf"
+else
+ sudo su root -c "echo 'addons_path=$OE_HOME_EXT/addons,$OE_HOME/custom/addons' >> /etc/${OE_CONFIG}.conf"
+fi
+
echo -e "* Create startup file"
sudo su root -c "echo '#!/bin/sh' >> $OE_HOME_EXT/start.sh"
sudo su root -c "echo 'sudo -u $OE_USER $OE_HOME_EXT/openerp-server --config=/etc/${OE_CONFIG}.conf' >> $OE_HOME_EXT/start.sh"
@@ -151,16 +176,12 @@ PATH=/bin:/sbin:/usr/bin
DAEMON=$OE_HOME_EXT/openerp-server
NAME=$OE_CONFIG
DESC=$OE_CONFIG
-
# Specify the user name (Default: odoo).
USER=$OE_USER
-
# Specify an alternate config file (Default: /etc/openerp-server.conf).
CONFIGFILE="/etc/${OE_CONFIG}.conf"
-
# pidfile
PIDFILE=/var/run/\${NAME}.pid
-
# Additional options that are passed to the Daemon.
DAEMON_OPTS="-c \$CONFIGFILE"
[ -x \$DAEMON ] || exit 0
@@ -171,7 +192,6 @@ pid=\`cat \$PIDFILE\`
[ -d /proc/\$pid ] && return 0
return 1
}
-
case "\${1}" in
start)
echo -n "Starting \${DESC}: "
@@ -186,7 +206,6 @@ start-stop-daemon --stop --quiet --pidfile \$PIDFILE \
--oknodo
echo "\${NAME}."
;;
-
restart|force-reload)
echo -n "Restarting \${DESC}: "
start-stop-daemon --stop --quiet --pidfile \$PIDFILE \
@@ -202,7 +221,6 @@ N=/etc/init.d/\$NAME
echo "Usage: \$NAME {start|stop|restart|force-reload}" >&2
exit 1
;;
-
esac
exit 0
EOF