Monit working folder

Issue #376 closed
Vovodroid created an issue

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)

  1. Tildeslash repo owner

    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.

  2. Tildeslash 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).

  3. Log in to comment