mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
Inconsistent naming of config files #308
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 @txr13 on GitHub (Mar 15, 2018).
While looking over my config files and considering setting a CONFIG_D, I noticed an inconsistency, and I'm wondering if it's intentional or overlooked.
The main config file that dehydrated looks for is named
config, with no extension. Per-certificate config files are also named eitherconfigoralias, with no extension. But it looks like the other config files in CONFIG_D must have a.shextension in order to be processed. (It certainly says as much in the template config file.)If CONFIG_D is set, both the general config files (with extension) and any certificate-specific config files (without extension) are going to be mixed into the same directory. This leads to a scenario where a user following the directive in the template config (that all config files in CONFIG_D must have a
.shextension) might end up having their certificate-specific config files ignored.@lukas2511 commented on GitHub (Mar 15, 2018):
Well, it probably was an accident, but I'll argue against removing the required suffix.
I know this behaviour from a lot of software, e.g. nginx includes
*.conffiles, uwsgi includes*.ini(or has a systemd service with wildcard for that), other software does similar things.Requiring this file ending does a few things: Editor tmp/backup files like
myconfig.sh~will not be included, "archived" files likemyconfig.sh.oldwill be ignored, etc. It also allows for files likeput_config_here, orREADME.The other config files have static names, there is just one file in that directory, so the name doesn't really matter that much. In my opinion removing the suffix from the wildcard would be a bad move, but so would be renaming those config files (it was
config.shbefore 0.3.0, and was renamed to justconfigto make it clear that it's not intended to be a executable script).Maybe a good move would be to use
*.confinstead, which makes this more like other software and a bit more clear that those are "just" config files. But people are using.shfiles now, supporting both is a bit redundant, so I guess the best thing would be to just leave it like is.Any other opinions on this? I'm always open for suggestions.
@lukas2511 commented on GitHub (Mar 15, 2018):
And obviously a solution to this issue would be better documentation... which I'll be working on... soon...ish... I promise! ;)