From 21baa98d0cb814119d61fe0855cbfa73ea541718 Mon Sep 17 00:00:00 2001 From: Yenthe Date: Mon, 7 Dec 2015 17:07:35 +0100 Subject: [PATCH] Enterprise installation script version Enterprise installation script version -> This will soon become an extra option inside the current existing script so that 9.0 Enterprise can also be installed and configured by default! This is just a new branch for testing purposes. --- odoo_install.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/odoo_install.sh b/odoo_install.sh index 504366d..ad7ba0a 100644 --- a/odoo_install.sh +++ b/odoo_install.sh @@ -107,8 +107,16 @@ 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" +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---- Setting permissions on home folder ----" sudo chown -R $OE_USER:$OE_USER $OE_HOME/* @@ -122,7 +130,7 @@ 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" +sudo su root -c "echo 'addons_path=$OE_HOME/enterprise/addons,$OE_HOME_EXT/addons' >> /etc/${OE_CONFIG}.conf" echo -e "* Create startup file" sudo su root -c "echo '#!/bin/sh' >> $OE_HOME_EXT/start.sh" @@ -151,16 +159,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 +175,6 @@ pid=\`cat \$PIDFILE\` [ -d /proc/\$pid ] && return 0 return 1 } - case "\${1}" in start) echo -n "Starting \${DESC}: " @@ -186,7 +189,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 +204,6 @@ N=/etc/init.d/\$NAME echo "Usage: \$NAME {start|stop|restart|force-reload}" >&2 exit 1 ;; - esac exit 0 EOF