@@ -35,12 +35,13 @@ OE_SUPERADMIN="admin"
3535GENERATE_RANDOM_PASSWORD=" True"
3636OE_CONFIG=" ${OE_USER} -server"
3737# Set the website name
38- WEBSITE_NAME=" _ "
38+ WEBSITE_NAME=" - "
3939# Set the default Odoo longpolling port (you still have to use -c /etc/odoo-server.conf for example to use this.)
4040LONGPOLLING_PORT=" 8072"
4141# Set to "True" to install certbot and have ssl enabled, "False" to use http
4242ENABLE_SSL=" True"
43-
43+ # Provide Email to register ssl certificate
44+ 4445# #
4546# ## WKHTMLTOPDF download links
4647# # === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
@@ -279,8 +280,8 @@ if [ $INSTALL_NGINX = "True" ]; then
279280 proxy_set_header X-Real-IP \$ remote_addr;
280281 add_header X-Frame-Options "SAMEORIGIN";
281282 add_header X-XSS-Protection "1; mode=block";
282- proxy_set_header X-Client-IP $remote_addr ;
283- proxy_set_header HTTP_X_FORWARDED_HOST $remote_addr ;
283+ proxy_set_header X-Client-IP \ $ remote_addr;
284+ proxy_set_header HTTP_X_FORWARDED_HOST \ $ remote_addr;
284285
285286 # odoo log files
286287 access_log /var/log/nginx/$OE_USER -access.log;
352353# Enable ssl
353354# --------------------------------------------------
354355
355- if [ $INSTALL_NGINX = " True" ] and [$ENABLE_SSL = " True" ]; then
356- sudo add-apt-repository ppa:certbot/certbot && sudo apt-get update
357- sudo apt-get install python-certbot-nginx
356+ if [
$INSTALL_NGINX = " True" ]
&& [
$ENABLE_SSL = " True" ]
&& [
$ADMIN_EMAIL != ' [email protected] ' ]
; then 357+ sudo add-apt-repository ppa:certbot/certbot -y && sudo apt-get update -y
358+ sudo apt-get install python-certbot-nginx -y
359+ sudo certbot --nginx -d $WEBSITE_NAME --noninteractive --agree-tos --email $ADMIN_EMAIL
358360 sudo certbot --nginx -d $WEBSITE_NAME --noninteractive
359361 echo " SSL is enabled!"
360362else
0 commit comments