Skip to content

Commit 21baa98

Browse files
committed
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.
1 parent b0faff0 commit 21baa98

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

odoo_install.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,16 @@ echo -e "\n==== Installing ODOO Server ===="
107107
sudo git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/odoo $OE_HOME_EXT/
108108

109109
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"
110+
sudo su $OE_USER -c "mkdir $OE_HOME/enterprise"
111+
sudo su $OE_USER -c "mkdir $OE_HOME/enterprise/addons"
112+
113+
echo -e "\n---- Adding Enterprise code under $OE_HOME/enterprise/addons ----"
114+
sudo git clone --depth 1 --branch 9.0 https://www.github.com/odoo/enterprise "$OE_HOME/enterprise/addons"
115+
116+
echo -e "\n---- Installing Enterprise specific libraries ----"
117+
sudo apt-get install nodejs npm
118+
sudo npm install -g less
119+
sudo npm install -g less-plugin-clean-css
112120

113121
echo -e "\n---- Setting permissions on home folder ----"
114122
sudo chown -R $OE_USER:$OE_USER $OE_HOME/*
@@ -122,7 +130,7 @@ echo -e "* Change server config file"
122130
sudo sed -i s/"db_user = .*"/"db_user = $OE_USER"/g /etc/${OE_CONFIG}.conf
123131
sudo sed -i s/"; admin_passwd.*"/"admin_passwd = $OE_SUPERADMIN"/g /etc/${OE_CONFIG}.conf
124132
sudo su root -c "echo 'logfile = /var/log/$OE_USER/$OE_CONFIG$1.log' >> /etc/${OE_CONFIG}.conf"
125-
sudo su root -c "echo 'addons_path=$OE_HOME_EXT/addons,$OE_HOME/custom/addons' >> /etc/${OE_CONFIG}.conf"
133+
sudo su root -c "echo 'addons_path=$OE_HOME/enterprise/addons,$OE_HOME_EXT/addons' >> /etc/${OE_CONFIG}.conf"
126134

127135
echo -e "* Create startup file"
128136
sudo su root -c "echo '#!/bin/sh' >> $OE_HOME_EXT/start.sh"
@@ -151,16 +159,12 @@ PATH=/bin:/sbin:/usr/bin
151159
DAEMON=$OE_HOME_EXT/openerp-server
152160
NAME=$OE_CONFIG
153161
DESC=$OE_CONFIG
154-
155162
# Specify the user name (Default: odoo).
156163
USER=$OE_USER
157-
158164
# Specify an alternate config file (Default: /etc/openerp-server.conf).
159165
CONFIGFILE="/etc/${OE_CONFIG}.conf"
160-
161166
# pidfile
162167
PIDFILE=/var/run/\${NAME}.pid
163-
164168
# Additional options that are passed to the Daemon.
165169
DAEMON_OPTS="-c \$CONFIGFILE"
166170
[ -x \$DAEMON ] || exit 0
@@ -171,7 +175,6 @@ pid=\`cat \$PIDFILE\`
171175
[ -d /proc/\$pid ] && return 0
172176
return 1
173177
}
174-
175178
case "\${1}" in
176179
start)
177180
echo -n "Starting \${DESC}: "
@@ -186,7 +189,6 @@ start-stop-daemon --stop --quiet --pidfile \$PIDFILE \
186189
--oknodo
187190
echo "\${NAME}."
188191
;;
189-
190192
restart|force-reload)
191193
echo -n "Restarting \${DESC}: "
192194
start-stop-daemon --stop --quiet --pidfile \$PIDFILE \
@@ -202,7 +204,6 @@ N=/etc/init.d/\$NAME
202204
echo "Usage: \$NAME {start|stop|restart|force-reload}" >&2
203205
exit 1
204206
;;
205-
206207
esac
207208
exit 0
208209
EOF

0 commit comments

Comments
 (0)