Auto generate cert without cleanup

This commit is contained in:
lostinlight 2018-11-09 20:56:17 +03:00
parent 5c55834b45
commit f57def9fdc
2 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,5 @@
image: node:8.12
image: node:10.13.0
pages:
script:
@ -34,5 +34,4 @@ cert-renewal:
- git config --global user.email $GITLAB_USER_EMAIL
- chmod +x ./letsencrypt_generate.sh
- chmod +x ./letsencrypt_authenticator.sh
- chmod +x ./letsencrypt_cleanup.sh
- ./letsencrypt_generate.sh

View File

@ -10,7 +10,7 @@ days_diff=$((($end_epoch - $current_epoch) / 60 / 60 / 24))
if [ $days_diff -lt $renew_days_threshold ]; then
ls
echo "Certificate is $days_diff days old, renewing now."
certbot certonly --manual --debug --preferred-challenges=http -m $GITLAB_USER_EMAIL --agree-tos --manual-auth-hook letsencrypt_authenticator.sh --manual-cleanup-hook letsencrypt_cleanup.sh --manual-public-ip-logging-ok -d fediverse.party
certbot certonly --manual --debug --preferred-challenges=http -m $GITLAB_USER_EMAIL --agree-tos --manual-auth-hook letsencrypt_authenticator.sh --manual-public-ip-logging-ok -d fediverse.party
echo "Certbot finished. Updating GitLab Pages domains."
curl --request PUT --header "PRIVATE-TOKEN: $CERTBOT_RENEWAL_GIT_TOKEN" --form "certificate=@/etc/letsencrypt/live/fediverse.party/fullchain.pem" --form "key=@/etc/letsencrypt/live/fediverse.party/privkey.pem" https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/pages/domains/fediverse.party
else