Skip to content

Commit 2d4f5dc

Browse files
authored
FIx a few bigs.
* Fix bug causing script to fail on 14.04, must remove debian packages for `python-pypdf2` and `python3-suds` and install only thru `pip3`. * TODO: Move all possible debian `python-` packages to install with `pip3`. This makes installer script much more portable across OS. * Fix `sudo` missing bug on `create_startup_script` in statements `chown` and `mv`. * Add `universe` repository, in function `update-server` because some extremely minimal servers are missing the default `universe` repo.
1 parent d666d04 commit 2d4f5dc

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

odoo_install.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Execute the script to install Odoo:
1414
# ./odoo-install
1515
################################################################################
16-
versiondate="2017-12-11a"
16+
versiondate="2018-01-10a"
1717

1818
##fixed parameters
1919
OE_USER="odoo"
@@ -289,6 +289,10 @@ function install_odoo_python_requirements_virtualenv {
289289

290290
function update_server {
291291
set +e
292+
#for ubuntu.
293+
#some minimal ubuntu servers are lacking the popular yet optional universe repo which contains pip3
294+
#so we must add universe to be sure we can install pip3.
295+
sudo add-apt-repository universe >> $INSTALL_LOG
292296
sudo apt-get update >> $INSTALL_LOG
293297
sudo apt-get -y upgrade >> $INSTALL_LOG
294298
set -e
@@ -411,8 +415,8 @@ SQL
411415
function install_dependencies {
412416
# suds is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
413417
sudo apt-get install -y python3 python3-pip wget git bzr python-pip \
414-
gdebi-core node-clean-css node-less python-gevent python3-suds \
415-
python-pypdf2 python-dateutil python-feedparser python-ldap python-libxslt1 \
418+
gdebi-core node-clean-css node-less python-gevent \
419+
python-dateutil python-feedparser python-ldap python-libxslt1 \
416420
python-lxml python-mako python-openid \
417421
python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing \
418422
python-reportlab python-simplejson python-tz python-vatnumber \
@@ -580,13 +584,14 @@ EOF
580584

581585
function create_startup_file {
582586
temp=~/temp0.sh
587+
rm -f $temp
583588
cat <<EOF > $temp
584589
#!/bin/sh
585590
sudo -u $OE_USER $OE_HOME_EXT/${OE_USER}-bin --config=/etc/${OE_CONFIG}.conf
586591
EOF
587592
chmod 0755 $temp
588-
chown $OE_USER. $temp
589-
mv $temp $OE_HOME_EXT/start.sh
593+
sudo chown $OE_USER. $temp
594+
sudo mv $temp $OE_HOME_EXT/start.sh
590595
}
591596

592597
function create_odoo_init_file {

0 commit comments

Comments
 (0)