From c2dec923768e6e2ffc9d6f4d17590880a229c772 Mon Sep 17 00:00:00 2001 From: Yenthe Date: Fri, 7 Oct 2016 14:50:02 +0200 Subject: [PATCH] [IMP] Add V10 Enterprise support This script is now combined to be able to install both V10 community and V10 enterprise. --- odoo_install.sh | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/odoo_install.sh b/odoo_install.sh index 03d7209..acd9b87 100644 --- a/odoo_install.sh +++ b/odoo_install.sh @@ -27,6 +27,8 @@ 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" +# 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" @@ -106,9 +108,25 @@ 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! + echo -e "\n--- Create symlink for node" + sudo ln -s /usr/bin/nodejs /usr/bin/node + 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 10.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 +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/* @@ -123,7 +141,11 @@ 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 '[options]' >> /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"