Overview

For more general background on Rattail config, see Configuration.

While it is possible to store config in a DB (see Storing Config in DB), we will not address that here. All config is presumed to exist in files, at least from the perspective of the Rattail File Monitor service. As a rule we avoid DB interactions in the filemon to keep its operation as simple as possible. (Everything “interesting” happens on the Linux server.)

The filemon service uses the Windows API to obtain the “default” location of the config file. It is not possible to directly tell the service which config file to use, it always will read the default path, which is: C:\ProgramData\rattail\rattail.conf

However we still want it to read filemon.conf instead of rattail.conf - and that is possible by way of a special config entry within rattail.conf:

[rattail.config]
winsvc.RattailFileMonitor = C:\ProgramData\rattail\filemon.conf

So really when the service starts it first reads rattail.conf, but sees that special entry and then reads filemon.conf instead. End result is as if it just read filemon.conf to begin with. (See Config File Inheritance for more on how some of that works.)