Unverified Commit 744fc60c authored by MegaS0ra's avatar MegaS0ra Committed by GitHub
Browse files

Creates or renew the cert if already exists

parent e385301e
......@@ -21,8 +21,11 @@ fi
echo -e "\n### Certificate creation..."
service iptables stop
./letsencrypt/letsencrypt-auto certonly --standalone --agree-tos --no-eff-email --manual-public-ip-logging-ok -d $(hostname) --rsa-key-size 4096 --email $1
service iptables start
if [ ! -f "/etc/letsencrypt/live/$(hostname)/fullchain.pem" ]; then
./letsencrypt/letsencrypt-auto certonly --standalone --agree-tos --no-eff-email --manual-public-ip-logging-ok -d $(hostname) --rsa-key-size 4096 --email $1
else
./letsencrypt/letsencrypt-auto renew --standalone --agree-tos --no-eff-email --manual-public-ip-logging-ok -d $(hostname) --rsa-key-size 4096 --email $1
fiservice iptables start
echo -e "\n### Adding certificate to R1Soft..."
cd /etc/letsencrypt/live/$(hostname)/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment