testing certbot

pull/215/head
Tony Benoy 6 years ago
parent 7a6c9d0d85
commit 85f3a1e816
No known key found for this signature in database
GPG Key ID: C26752B6501EAD3D

@ -38,6 +38,8 @@ OE_CONFIG="${OE_USER}-server"
WEBSITE_NAME="_" WEBSITE_NAME="_"
# Set the default Odoo longpolling port (you still have to use -c /etc/odoo-server.conf for example to use this.) # Set the default Odoo longpolling port (you still have to use -c /etc/odoo-server.conf for example to use this.)
LONGPOLLING_PORT="8072" LONGPOLLING_PORT="8072"
# Set to "True" to install certbot and have ssl enabled, "False" to use http
ENABLE_SSL="True"
## ##
### WKHTMLTOPDF download links ### WKHTMLTOPDF download links
@ -345,6 +347,22 @@ EOF
else else
echo "Nginx isn't installed due to choice of the user!" echo "Nginx isn't installed due to choice of the user!"
fi fi
#--------------------------------------------------
# Enable ssl
#--------------------------------------------------
if [ $INSTALL_NGINX = "True" ] and [$ENABLE_SSL= "True" ];
sudo add-apt-repository ppa:certbot/certbot && sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx -d $WEBSITE_NAME --noninteractive
echo "SSL is enabled!"
else
echo "SSL isn't enabled due to choice of the user!"
fi
echo -e "* Starting Odoo Service" echo -e "* Starting Odoo Service"
sudo su root -c "/etc/init.d/$OE_CONFIG start" sudo su root -c "/etc/init.d/$OE_CONFIG start"
echo "-----------------------------------------------------------" echo "-----------------------------------------------------------"

Loading…
Cancel
Save