mirror of
https://codeberg.org/fediverse/fediparty.git
synced 2024-11-18 22:59:18 +00:00
Add www to cert generator
This commit is contained in:
parent
ad11f18ea8
commit
97a05399cc
|
@ -10,9 +10,10 @@ days_diff=$((($end_epoch - $current_epoch) / 60 / 60 / 24))
|
||||||
if [ $days_diff -lt $renew_days_threshold ]; then
|
if [ $days_diff -lt $renew_days_threshold ]; then
|
||||||
ls
|
ls
|
||||||
echo "Certificate is $days_diff days old, renewing now."
|
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-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-cleanup-hook letsencrypt_cleanup.sh --manual-public-ip-logging-ok -d fediverse.party -d www.fediverse.party
|
||||||
echo "Certbot finished. Updating GitLab Pages domains."
|
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
|
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
|
||||||
|
curl --request PUT --header "PRIVATE-TOKEN: $CERTBOT_RENEWAL_GIT_TOKEN" --form "certificate=@/etc/letsencrypt/live/www.fediverse.party/fullchain.pem" --form "key=@/etc/letsencrypt/live/www.fediverse.party/privkey.pem" https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/pages/domains/www.fediverse.party
|
||||||
else
|
else
|
||||||
echo "Certificate still valid for $days_diff days, no renewal required."
|
echo "Certificate still valid for $days_diff days, no renewal required."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue