redirect and reload nginx

pull/215/head
Tony Benoy 6 years ago
parent 28b18b3d59
commit d3af3ce33c
No known key found for this signature in database
GPG Key ID: C26752B6501EAD3D

@ -356,8 +356,8 @@ fi
if [ $INSTALL_NGINX = "True" ] && [ $ENABLE_SSL = "True" ] && [ $ADMIN_EMAIL != 'odoo@example.com' ];then if [ $INSTALL_NGINX = "True" ] && [ $ENABLE_SSL = "True" ] && [ $ADMIN_EMAIL != 'odoo@example.com' ];then
sudo add-apt-repository ppa:certbot/certbot -y && sudo apt-get update -y sudo add-apt-repository ppa:certbot/certbot -y && sudo apt-get update -y
sudo apt-get install python-certbot-nginx -y sudo apt-get install python-certbot-nginx -y
sudo certbot --nginx -d $WEBSITE_NAME --noninteractive --agree-tos --email $ADMIN_EMAIL sudo certbot --nginx -d $WEBSITE_NAME --noninteractive --agree-tos --email $ADMIN_EMAIL --redirect
sudo certbot --nginx -d $WEBSITE_NAME --noninteractive sudo service nginx reload
echo "SSL is enabled!" echo "SSL is enabled!"
else else
echo "SSL isn't enabled due to choice of the user!" echo "SSL isn't enabled due to choice of the user!"

Loading…
Cancel
Save