Forum

Does Hiawatha have different location preferences when loading hiawatha.conf?

Erik S
22 March 2017, 18:10
Does Hiawatha have different location preferences when loading hiawatha.conf?
for example if I place hiawatha.conf in /etc/hiawtha.conf, will it be loaded before /etc/hiawatha/hiawatha.conf?
I have made sfs squash file module of a LHMP server for Puppy Linux and since Puppy Linux comes with Hiwatha v 6.10 built in I would like to be able to load this SFS file on the fly and use the that conf file placed in the /etc before it finds the /etc/hiawatha copy.
Joe Schmoe
23 March 2017, 04:01
When starting Hiawatha, you can specify an alternate config directory with the -c option.

$ hiawatha -h
Usage: hiawatha [options]
Options: -c <path>: path to where the configrationfiles are located.
-d: don't fork to the background.
-h: show this information and exit.
-k: check configuration and exit.
-m: show enabled modules and exit.
-v: show version and copyright and exit.
Hugo Leisink
23 March 2017, 10:23
Hiawatha will only read one hiawatha.conf file. When using the -c option, it will not read one from the default location.
Erik S
27 March 2017, 01:55
Thanks for the info, I knew about the -c option, which I ended up using.
But I was looking if there is an automatic load done on a priority basis. For example Hiawatha first looks in /etc then /etc/hiawatha or wherever indicated by the -c option. So if Hiawatha finds a conf file in /etc that will be used over the one in /etc/hiawatha.
I found a solution that uses a script to start the correct Hiawatha. If there was such a conf file load system I could use /etc/init.d/hiawatha to start the correct server version when the SFS module is installed.
Hugo Leisink
27 March 2017, 21:54
No, it will only look for a configuration file once. Once in the default directory as defined during compilation, or overriden via the -c flag.
This topic has been closed.