- changed status to closed
Monit working folder
Issue #376
closed
HI, it seems that currently monit does "cd /" at start, so all paths in config files should be absolute, and moving them to other place can be quite difficult.
May be it's worth to leave working dir "as is", allowing to launch monit from any folder and use relative paths in configuration?
It shouldn't affect current users, as now absolute paths are used.
Regards
Comments (4)
-
repo owner -
reporter Probably relative paths can be resolved from *.rc file location where the path is used?
-
repo owner FYI: The main reason Monit and other server programs does
cd /
at startup is so you can unmount filesystems. For instance, if Monit used your home-folder as its current working directory,/home
cannot be unmounted as long as Monit runs (if home is a filesystem). -
reporter Thanks for clarification!
- Log in to comment
Keeping current working directory will be very confusing, as the relative path will change every time you start monit from different directory then the one you intended to use when you wrote the configuration file.
For relative paths support it could be better to add new statement to monit configuration file, which will allow to set monit base directory. This directory can then be used if relative path is found.