`include_dir` behavior mismatch with documentation
The document claimed:
include_dir dir External configuration files may be included by using the include_dir option. This defines a directory that will be searched for config files. ** All files that end in '.conf' ** will be loaded as a configuration file. It is best to have this as the last option in the main file. This option will only be processed from the main configuration file. The directory specified must not contain the main configuration file.
In practice, all files with ext name starting with .conf will be included. If a.conf is renamed to a.conf~~, it will still be loaded.
I tested this on ubuntu x64 machine. And was not able to reproduce this. I started mosquitto using mosquitto -c ../mosquitto.conf. In the conf file I specified include_dir. In this folder, I made 3 files, abc.conf, def.conf, abc.conf~~, It loads only two, just like It's supposed to.
`1745910525: Loading config file ../test_dir/abc.conf
1745910525: Loading config file ../test_dir/def.conf
1745910525: mosquitto version 2.0.22 starting
1745910525: Config loaded from ../mosquitto.conf.`
Thanks for testing, @abtom87. I get the same results.
@zcattacz What version are you running, and on what platform?
It was on a Debian bullseye server, when I was trying to disable the bridge setting (one .conf for each bridge configured) I found the external bridge constantly get connecting entry in log, until I moved the .conf~~ into a different folder. The version was 1.18 ? (I am only sure about the last 2 digit, it's now updated to 2.0.20)
There may be some differences from the test:
abc.conf~~could be shadowed byabc.confdepending on the mechanisms behind the scene- reload/restart via
systemdservice, not sure about the switches it used to load mosquitto. (and I don't seeLoading config filemessage in mosquitto.log, not any.)
I will double check next when I am back work, and report back.