unit icon indicating copy to clipboard operation
unit copied to clipboard

Add support for a user configuration file.

Open alejandro-colomar opened this issue 3 years ago • 2 comments

Add support for a user-specified user configuration file, normally under $sysconfdir, that is, /etc. I'd recommend using /etc/unit/unitd.conf.json for the default pathname.

The part for setting the file's default pathname, and for changing it, will be implemented in the auto scripts, but since it will depend on the PR that adds a default prefix, that code is not yet written in this commit. TODO.

alejandro-colomar avatar Aug 10 '22 12:08 alejandro-colomar

I wonder if it even needs to be a file? Or could it just be stored internally to unit? That way users won't go thinking they can or should be editing it.

Or if it needs to be an actual file, maybe sticking it under the docroot e.g /usr/share/doc/unit would be better...

ac000 avatar Aug 12 '22 13:08 ac000

I wonder if it even needs to be a file? Or could it just be stored internally to unit? That way users won't go thinking they can or should be editing it.

I think a real file would make it simpler.

Or if it needs to be an actual file, maybe sticking it under the docroot e.g /usr/share/doc/unit would be better...

Maybe. But then I would certainly add a flag to enable reading that file, since noone expects that a file in $docdir would change behavior of a program.

alejandro-colomar avatar Aug 12 '22 16:08 alejandro-colomar