Skip to content

Commit 2f10dfc

Browse files
committed
changes
1 parent dc043f4 commit 2f10dfc

3 files changed

Lines changed: 70 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ There are a few things you can configure, this is the most used list:<br/>
2222
```INSTALL_NGINX``` is set to ```False``` by default. Set this to ```True``` if you want to install Nginx.<br/>
2323
```WEBSITE_NAME``` Set the website name here for nginx configuration<br/>
2424
```WEBSITE_NAME``` Set the website name here for nginx configuration<br/>
25-
```ENABLE_SSL``` Set installs [certbot](https://github.com/certbot/certbot) configures https with Let's Encrypted certificate<br/>
26-
```ADMIN_EMAIL``` Email is needed to register for Let's Enctryped Registeration. Replace the default place holder with an email of your organisation.<br/>
27-
```INSTALL_NGINX``` and ```ENABLE_SSL``` must be set to ```True``` and the place holder in ```ADMIN_EMAIL``` must be replaced with a valid email address for certbot installation<br/>
25+
```ENABLE_SSL``` Set this to ```True``` installs [certbot](https://github.com/certbot/certbot) configures https with a free Let's Encrypted certificate<br/>
26+
```ADMIN_EMAIL``` Email is needed to register for Let's Enctryped Registeration. Replace the default placeholder with an email of your organisation.<br/>
27+
```INSTALL_NGINX``` and ```ENABLE_SSL``` must be set to ```True``` and the placeholder in ```ADMIN_EMAIL``` must be replaced with a valid email address for certbot installation<br/>
2828
_By enabling SSL though certbot you agree to the following [policies](https://www.eff.org/code/privacy/policy)_ <br/>
2929

3030
#### 3. Make the script executable

odoo_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,14 @@ fi
353353
# Enable ssl with certbot
354354
#--------------------------------------------------
355355

356-
if [ $INSTALL_NGINX = "True" ] && [ $ENABLE_SSL = "True" ] && [ $ADMIN_EMAIL != '[email protected]' ];then
356+
if [ $INSTALL_NGINX = "True" ] && [ $ENABLE_SSL = "True" ] && [ $ADMIN_EMAIL != "[email protected]" ] && [ $WEBSITE_NAME != "_" ];then
357357
sudo add-apt-repository ppa:certbot/certbot -y && sudo apt-get update -y
358358
sudo apt-get install python-certbot-nginx -y
359359
sudo certbot --nginx -d $WEBSITE_NAME --noninteractive --agree-tos --email $ADMIN_EMAIL --redirect
360360
sudo service nginx reload
361361
echo "SSL/HTTPS is enabled!"
362362
else
363-
echo "SSL/HTTPS isn't enabled due to choice of the user!"
363+
echo "SSL/HTTPS isn't enabled due to choice of the user or because of a misconfiguration!"
364364
fi
365365

366366
echo -e "* Starting Odoo Service"

odoo_uninstall.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
################################################################################
3+
# Script for uninstalling Odoo on Ubuntu 14.04, 15.04, 16.04 and 18.04 (could be used for other version too)
4+
# Author: Tony Benoy
5+
#-------------------------------------------------------------------------------
6+
# This script will uninstall Odoo from your Ubuntu 16.04 server.
7+
#------------------------------------------------------------------------------
8+
# Make a new file:
9+
# sudo nano odoo-uninstall.sh
10+
# Place this content in it and then make the file executable:
11+
# sudo chmod +x odoo-uninstall.sh
12+
# Execute the script to install Odoo:
13+
# ./odoo-uninstall
14+
################################################################################
15+
16+
OE_USER="odoo"
17+
OE_HOME="/$OE_USER"
18+
OE_HOME_EXT="/$OE_USER/${OE_USER}-server"
19+
#The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
20+
#Set to true if you want to install it, false if you don't need it or have it already installed.
21+
INSTALL_WKHTMLTOPDF="True"
22+
#Set the default Odoo port (you still have to use -c /etc/odoo-server.conf for example to use this.)
23+
OE_PORT="8069"
24+
#Choose the Odoo version which you want to install. For example: 12.0,11.0, 10.0 or saas-18. When using 'master' the master version will be installed.
25+
#IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 12.0
26+
OE_VERSION="12.0"
27+
# Set this to True if you want to uninstall Odoo Enterprise version!
28+
IS_ENTERPRISE="False"
29+
# Set this to True if you want to uninstall Nginx!
30+
INSTALL_NGINX="False"
31+
32+
OE_CONFIG="${OE_USER}-server"
33+
34+
#--------------------------------------------------
35+
# Install PostgreSQL Server
36+
#--------------------------------------------------
37+
echo -e "\n---- Uninstall PostgreSQL Server ----"
38+
sudo apt-get remove --purge postgresql -y
39+
#--------------------------------------------------
40+
# Install Dependencies
41+
#--------------------------------------------------
42+
echo -e "\n--- Installing Python 3 + pip3 --"
43+
sudo apt-get remove --purge python3 python3-pip -y
44+
45+
echo -e "\n---- Install tool packages ----"
46+
sudo apt-get remove --purge wget git bzr python-pip gdebi-core -y
47+
48+
echo -e "\n---- Install python packages ----"
49+
sudo apt-get remove --purge libxml2-dev libxslt1-dev zlib1g-dev libpng12-0 -y
50+
sudo apt-get remove --purge libsasl2-dev libldap2-dev libssl-dev -y
51+
sudo apt-get remove --purge python-pypdf2 python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil -y
52+
sudo pip3 uninstall pypdf2 Babel passlib Werkzeug decorator python-dateutil pyyaml psycopg2 psutil html2text docutils lxml pillow reportlab ninja2 requests gdata XlsxWriter vobject python-openid pyparsing pydot mock mako Jinja2 ebaysdk feedparser xlwt psycogreen suds-jurko pytz pyusb greenlet xlrd chardet libsass
53+
54+
echo -e "\n---- Install python libraries ----"
55+
# This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
56+
sudo apt-get install python3-suds
57+
58+
echo -e "\n--- Install other required packages"
59+
sudo apt-get remove --purge node-clean-css -y
60+
sudo apt-get remove --purge node-less -y
61+
sudo apt-get remove --purge python-gevent -y
62+
sudo rm -rf /odoo
63+
sudo apt-get remove --purge nginx
64+
sudo rm /etc/init.d/$OE_CONFIG
65+
sudo rm /etc/${OE_CONFIG}.conf

0 commit comments

Comments
 (0)