Fix storage directory #41

Closed
opened 2025-12-29 00:23:05 +01:00 by adam · 3 comments
Owner

Originally created by @reetp on GitHub (Jan 22, 2016).

The certs get put in the following directory structure

/etc/letsencrypt.sh/certs/{some.domain}
/etc/letsencrypt.sh/certs/{other.domain}

I have a requirement to keep them in one directory which is not dictated by the domain names. This is handy in circumstances when the server with letsencrypt may not actually use the certificates itself.

The fix is quite easy - I can do a pull request but wanted you to check the following and see if it would be accepted:

in config.sh add variable if required:
LOCDIR="storage"

In letsencrypt.sh add the following line - defaults to domain name if LOCDIR not set:

Create certificate for domain(s)
sign_domain() {
domain="${1}"

  • locdir="${LOCDIR:-$domain}"

Replace all instances of

/certs/${domain}

with

/certs/${LOCDIR}

Originally created by @reetp on GitHub (Jan 22, 2016). The certs get put in the following directory structure /etc/letsencrypt.sh/certs/{some.domain} /etc/letsencrypt.sh/certs/{other.domain} I have a requirement to keep them in one directory which is not dictated by the domain names. This is handy in circumstances when the server with letsencrypt may not actually use the certificates itself. The fix is quite easy - I can do a pull request but wanted you to check the following and see if it would be accepted: in config.sh add variable if required: LOCDIR="storage" In letsencrypt.sh add the following line - defaults to domain name if LOCDIR not set: Create certificate for domain(s) sign_domain() { domain="${1}" - locdir="${LOCDIR:-$domain}" Replace all instances of /certs/${domain} with /certs/${LOCDIR}
adam closed this issue 2025-12-29 00:23:07 +01:00
Author
Owner

@lukas2511 commented on GitHub (Jan 22, 2016):

You can use hooks to move certificates to other directories or even upload them to other servers, whatever you need.

@lukas2511 commented on GitHub (Jan 22, 2016): You can use hooks to move certificates to other directories or even upload them to other servers, whatever you need.
Author
Owner

@the-solipsist commented on GitHub (Mar 12, 2016):

@lukas2511 Would it be possible to include an example in hook.sh.example of how to move these automatically to /etc/ssl/private? It'd greatly help us noobs. Thanks!

@the-solipsist commented on GitHub (Mar 12, 2016): @lukas2511 Would it be possible to include an example in hook.sh.example of how to move these automatically to /etc/ssl/private? It'd greatly help us noobs. Thanks!
Author
Owner

@lukas2511 commented on GitHub (Mar 18, 2016):

@the-solipsist there are some examples in the wiki, i may add more, but in the repository i want to keep the hook example as clean as possible

@lukas2511 commented on GitHub (Mar 18, 2016): @the-solipsist there are some examples in the wiki, i may add more, but in the repository i want to keep the hook example as clean as possible
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#41