Skip to content

Commit c2dec92

Browse files
authored
[IMP] Add V10 Enterprise support
This script is now combined to be able to install both V10 community and V10 enterprise.
1 parent 4778542 commit c2dec92

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

odoo_install.sh

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ OE_PORT="8069"
2727
#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.
2828
#IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 10.0
2929
OE_VERSION="10.0"
30+
# Set this to True if you want to install Odoo 10 Enterprise!
31+
IS_ENTERPRISE="False"
3032
#set the superadmin password
3133
OE_SUPERADMIN="admin"
3234
OE_CONFIG="${OE_USER}-server"
@@ -106,9 +108,25 @@ sudo chown $OE_USER:$OE_USER /var/log/$OE_USER
106108
echo -e "\n==== Installing ODOO Server ===="
107109
sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/odoo $OE_HOME_EXT/
108110

109-
echo -e "\n---- Create custom module directory ----"
110-
sudo su $OE_USER -c "mkdir $OE_HOME/custom"
111-
sudo su $OE_USER -c "mkdir $OE_HOME/custom/addons"
111+
if [ $IS_ENTERPRISE = "True" ]; then
112+
# Odoo Enterprise install!
113+
echo -e "\n--- Create symlink for node"
114+
sudo ln -s /usr/bin/nodejs /usr/bin/node
115+
sudo su $OE_USER -c "mkdir $OE_HOME/enterprise"
116+
sudo su $OE_USER -c "mkdir $OE_HOME/enterprise/addons"
117+
118+
echo -e "\n---- Adding Enterprise code under $OE_HOME/enterprise/addons ----"
119+
sudo git clone --depth 1 --branch 10.0 https://www.github.com/odoo/enterprise "$OE_HOME/enterprise/addons"
120+
121+
echo -e "\n---- Installing Enterprise specific libraries ----"
122+
sudo apt-get install nodejs npm
123+
sudo npm install -g less
124+
sudo npm install -g less-plugin-clean-css
125+
else
126+
echo -e "\n---- Create custom module directory ----"
127+
sudo su $OE_USER -c "mkdir $OE_HOME/custom"
128+
sudo su $OE_USER -c "mkdir $OE_HOME/custom/addons"
129+
fi
112130

113131
echo -e "\n---- Setting permissions on home folder ----"
114132
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
123141
sudo sed -i s/"; admin_passwd.*"/"admin_passwd = $OE_SUPERADMIN"/g /etc/${OE_CONFIG}.conf
124142
sudo su root -c "echo '[options]' >> /etc/${OE_CONFIG}.conf"
125143
sudo su root -c "echo 'logfile = /var/log/$OE_USER/$OE_CONFIG$1.log' >> /etc/${OE_CONFIG}.conf"
126-
sudo su root -c "echo 'addons_path=$OE_HOME_EXT/addons,$OE_HOME/custom/addons' >> /etc/${OE_CONFIG}.conf"
144+
if [ $IS_ENTERPRISE = "True" ]; then
145+
sudo su root -c "echo 'addons_path=$OE_HOME/enterprise/addons,$OE_HOME_EXT/addons' >> /etc/${OE_CONFIG}.conf"
146+
else
147+
sudo su root -c "echo 'addons_path=$OE_HOME_EXT/addons,$OE_HOME/custom/addons' >> /etc/${OE_CONFIG}.conf"
148+
fi
127149

128150
echo -e "* Create startup file"
129151
sudo su root -c "echo '#!/bin/sh' >> $OE_HOME_EXT/start.sh"

0 commit comments

Comments
 (0)