diff --git a/ChangeLog.txt b/ChangeLog.txt index 3409196b49..b2ce7b9e37 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,7 @@ Broker: other security options. Closes #1149. - Fix include_dir not sorting config files before loading. This was partially fixed in 1.5 previously. +- Improve documentation around the `include_dir` option. Closes #1154. Library: - Fix `mosquitto_topic_matches_sub()` not returning MOSQ_ERR_INVAL for diff --git a/man/mosquitto.conf.5.xml b/man/mosquitto.conf.5.xml index 60337bf9dc..e3e64c9d2c 100644 --- a/man/mosquitto.conf.5.xml +++ b/man/mosquitto.conf.5.xml @@ -349,6 +349,51 @@ file. This option will only be processed from the main configuration file. The directory specified must not contain the main configuration file. + The configuration files in + are loaded in case + insensitive alphabetical order. + + Given the files + b.conf, + A.conf, + 01.conf, + a.conf, and + 00.conf inside + , the config files + would be loaded in this order: + +00.conf +01.conf +A.conf +a.conf +b.conf + + If this option is used multiple times, then each + option is processed + completely in the order that they are written in the + main configuration file. + + Assuming a directory + one.d containing + files B.conf and + C.conf, and a second + directory two.d + containing files + A.conf and + D.conf, and a + config: + +include_dir one.d +include_dir two.d +Then the config files would be loaded in this order: + +# files from one.d +B.conf +C.conf +# files from two.d +A.conf +D.conf + diff --git a/mosquitto.conf b/mosquitto.conf index d0ec0df7b6..c974eaf39a 100644 --- a/mosquitto.conf +++ b/mosquitto.conf @@ -872,6 +872,10 @@ # 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. +# Files within include_dir will be loaded sorted in case-insensitive +# alphabetical order. If this option is given multiple times, all of the files +# from the first instance will be processed before the next instance. See the +# man page for examples. #include_dir # =================================================================