mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
import-certs.sh does not use the same config.sh paths that letsencrypt.sh does. #12
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @samueldr on GitHub (Dec 12, 2015).
As evidenced here:
d322e072d6/import-certs.sh (L14)The actual paths checked by letsencrypt.sh:
0e92aba206/letsencrypt.sh (L29)@germeier commented on GitHub (Dec 12, 2015):
I really don't like that this is a separate script. Is there a reason this shouldn't be handeld with an "--import-certs / -i" option command in the main script?
@digint commented on GitHub (Dec 12, 2015):
Please don't include helper scripts into the main script. I think the main reason why people are / will be using letsencrypt.sh is because it's simple and straightforward.
@samueldr commented on GitHub (Dec 12, 2015):
I agree with digint here. Other than copying the whole configuration file searching block, I can see two ways, one really "simple" and the other not that complex that would make it find the proper config file.
CONFIG_DIRfrom environmentCONFIG_FILE="${CONFIG_FILE:-${SCRIPTDIR}/config.sh}"which is unwieldy, but would allow the configuration file to be found anywhere.SCRIPT_DIR, which means it know where letsencrypt.sh is. It could source the script using a particular command (--source?) which would basically "do nothing", which makes the environment available in the script that sourced it.This approach is cleaner, but does not allow passing
--configto the import script. With care, part of theletsencrypt.sh's arguments parsing could work through the sourcing, but I'm not sure how clean and how easy it would be,@aguindehi commented on GitHub (Dec 12, 2015):
I agree with samueldr and digint. It's much cleaner to have an external helper script. Especially since that helper script will have to have multiple parts when deploying to a secondary machine (as digint did in his pull request, which I very much like). [fixed typos]
@lukas2511 commented on GitHub (Dec 14, 2015):
Fixed with
1ab6a436c0and62037de041.