auto-letsencrypt icon indicating copy to clipboard operation
auto-letsencrypt copied to clipboard

CERTS_PATH non functional for multiple domains

Open Shardj opened this issue 2 years ago • 0 comments

Should be something like this instead

for domain in "${DOMAINS[@]}"; do
    cp /etc/letsencrypt/live/$domain/* $CERTS_PATH/
done

Just to get it functional. But even then you end up with the problem of the files from different domains having the same name.

It would probably be better to simply cp -Lr /etc/letsencrypt/live/* $CERTS_PATH/ instead to keep the domain directories separate. Also (-L) to make sure that we don't copy a symlink that'll break when used as a volume between containers.

Edit: actually since certbot will only use the first domain in the list to create the certificate name I suppose cp -L /etc/letsencrypt/live/${DOMAINS[0]}/* $CERTS_PATH/ is what you want

Shardj avatar Mar 15 '23 16:03 Shardj