Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Certbot support #3

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ACME-DNS-NC
Simple helper script for various [Let's Encrypt][1] clients.
Developed for [GetSSL][2] and [ACME.sh][3], tested at Debian and Ubuntu.
Developed for [GetSSL][2], [ACME.sh][3] and [Certbot][4], tested at Debian and Ubuntu.

## Initial setup
Download or clone the archive and extract it to a new folder.
Expand Down Expand Up @@ -39,3 +39,4 @@ Important: This project is **not** affiliated with netcup GmbH!
[1]: https://letsencrypt.org/docs/client-options/
[2]: https://github.com/srvrco/getssl
[3]: https://github.com/Neilpang/acme.sh
[4]: https://github.com/certbot/certbot
14 changes: 14 additions & 0 deletions scripts/certbot-nc-auth
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# --manual-auth-hook
if [ -n "${CERTBOT_DOMAIN}" ] && [ -n "${CERTBOT_VALIDATION}" ]
then
"$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/acme-dns-nc" --add "${CERTBOT_DOMAIN}" "${CERTBOT_VALIDATION}"

# netcup updates DNS data every 5 minutes, 1 extra minute safety margin
#sleep $(( 6 - $(date "+%_M" -d "-5 minutes") % 5 ))m
sleep 10m
else
echo "env variables missing"
false
fi
10 changes: 10 additions & 0 deletions scripts/certbot-nc-cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# --manual-cleanup-hook
if [ -n "${CERTBOT_DOMAIN}" ] && [ -n "${CERTBOT_VALIDATION}" ]
then
"$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/acme-dns-nc" --del "${CERTBOT_DOMAIN}" "${CERTBOT_VALIDATION}"
else
echo "env variables missing"
false
fi