feat: make linux script installation non-interactive (#4355)
This PR changes the LetsEncrypt behaviour to be non-interactive. Earlier, the installation flow was waiting for user input at the SSL cert generation stage. With this change, once the user confirms completes the initial selection, the installation can be completed unattended.
This commit is contained in:
parent
c397fe1964
commit
3813b3b372
1 changed files with 3 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Description: Chatwoot installation script
|
||||
# OS: Ubuntu 20.04 LTS / Ubuntu 20.10
|
||||
# Script Version: 0.7
|
||||
# Script Version: 0.8
|
||||
# Run this script as root
|
||||
|
||||
read -p 'Would you like to configure a domain and SSL for Chatwoot?(yes or no): ' configure_webserver
|
||||
|
@ -12,6 +12,7 @@ then
|
|||
read -p 'Enter your sub-domain to be used for Chatwoot (chatwoot.domain.com for example) : ' domain_name
|
||||
echo -e "\nThis script will try to generate SSL certificates via LetsEncrypt and serve chatwoot at
|
||||
"https://$domain_name". Proceed further once you have pointed your DNS to the IP of the instance.\n"
|
||||
read -p 'Enter the email LetsEncrypt can use to send reminders when your SSL certificate is up for renewal: ' le_email
|
||||
read -p 'Do you wish to proceed? (yes or no): ' exit_true
|
||||
if [ $exit_true == "no" ]
|
||||
then
|
||||
|
@ -138,7 +139,7 @@ else
|
|||
curl https://ssl-config.mozilla.org/ffdhe4096.txt >> /etc/ssl/dhparam
|
||||
wget https://raw.githubusercontent.com/chatwoot/chatwoot/develop/deployment/nginx_chatwoot.conf
|
||||
cp nginx_chatwoot.conf /etc/nginx/sites-available/nginx_chatwoot.conf
|
||||
certbot certonly --nginx -d $domain_name
|
||||
certbot certonly --non-interactive --agree-tos --nginx -m $le_email -d $domain_name
|
||||
sed -i "s/chatwoot.domain.com/$domain_name/g" /etc/nginx/sites-available/nginx_chatwoot.conf
|
||||
ln -s /etc/nginx/sites-available/nginx_chatwoot.conf /etc/nginx/sites-enabled/nginx_chatwoot.conf
|
||||
systemctl restart nginx
|
||||
|
|
Loading…
Reference in a new issue