fix(certbot): updating letsencrypt certificates.

Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com>
This commit is contained in:
Rajesh Rajendran 2021-10-13 14:39:49 +05:30
parent cbf44937aa
commit b15281466d
No known key found for this signature in database
GPG key ID: F9F6FCAB8BACB638

View file

@ -14,7 +14,7 @@ read dns_name
echo please enter your email id:
read emai_id
ssh_ansible_user=$(whoami)
certbot_home=/etc/letsencrypt/archive/$dns_name
certbot_home=/etc/letsencrypt/live/$dns_name
#Check certbot installed or not
@ -26,8 +26,8 @@ fi
sudo certbot certonly --non-interactive --agree-tos -m $emai_id -d $dns_name --standalone
sudo cp $certbot_home/privkey1.pem ${homedir}/site.key
sudo cp $certbot_home/fullchain1.pem ${homedir}/site.crt
sudo cp $certbot_home/privkey.pem ${homedir}/site.key
sudo cp $certbot_home/fullchain.pem ${homedir}/site.crt
sudo chown -R $ssh_ansible_user:$ssh_ansible_user ${homedir}/site.key ${homedir}/site.crt
sudo chmod 775 ${homedir}/site.crt ${homedir}/site.key