atc0005/dnsc

Add additional supported automatic config file paths

Opened this issue · 0 comments

In addition to the locations specified in the README:

dnsc/README.md

Lines 256 to 268 in bc36216

Once reviewed and potentially adjusted, your copy of the `config.toml` file
can be placed in one of the following locations to be automatically detected
and used by this application:
- alongside the `dnsc` (or `dnsc.exe`) binary (as `config.toml`)
- at `$HOME/.config/dnsc/config.toml` on a UNIX-like system (e.g., Linux
distro, Mac)
- at `C:\Users\YOUR_USERNAME\AppData\dnsc\config.toml` on a Windows system
Feel free to place the file wherever you like and refer to it using the `-cf`
(short flag name) or `-config-file` (full-length flag name). See the
[Examples](#examples) and [Command-line arguments](#command-line-arguments)
sections for usage details.

Add these locations to the list of locations automatically used if found:

  • /etc/dnsc/config.toml
  • /etc/dnsc.toml
  • /usr/local/etc/dnsc/config.toml
  • /usr/local/etc/dnsc.toml

In terms of priority they would be checked after $HOME/.config/dnsc/config.toml. This would allow a per-user override, but with fallback to a general path.

I should double-check to see whether there is a precedent of using an app-specific etc subdirectory path over a loose file in etc, or if it is the other way around.