diff --git a/src/usr/lib/alternc/install.d/alternc-certbot b/src/usr/lib/alternc/install.d/alternc-certbot index 840c952..c23b8f0 100755 --- a/src/usr/lib/alternc/install.d/alternc-certbot +++ b/src/usr/lib/alternc/install.d/alternc-certbot @@ -8,7 +8,8 @@ db_get alternc-certbot/mail MAIL="$RET" -certbot --agree-tos --email "$MAIL" --non-interactive --apache certonly -d "$FQDN" - -cat "/etc/letsencrypt/live/$FQDN/privkey.pem" > /etc/alternc/apache.pem -cat "/etc/letsencrypt/live/$FQDN/fullchain.pem" >> /etc/alternc/apache.pem \ No newline at end of file +if certbot --agree-tos --email "$MAIL" --non-interactive --apache certonly -d "$FQDN" +then + cat "/etc/letsencrypt/live/$FQDN/privkey.pem" > /etc/alternc/apache.pem + cat "/etc/letsencrypt/live/$FQDN/fullchain.pem" >> /etc/alternc/apache.pem +fi \ No newline at end of file