Open SirLouen opened 8 months ago
a user config is the wrong solution. The file in /etc is the user config as far as TL is concerned.
Drop in dir with fragments could be done but frankly we update so seldom that I don't think that this is really a problem.
Drop in dir with fragments could be done but frankly we update so seldom that I don't think that this is really a problem.
With an unattended update system, this is a problem because the software never updates until the admin checks what's going on which ends in having to do all the manual procedure.
I think it's the most straightforward and easy implementation with a user.config.js
: you get the array, and you replace the existing array with the new values. I think I could do a PR in a couple of minutes for this solution.
if you actually want to work on it, merge the file in $THELOUNGE_HOME with the default config. Again, the config file there is the user config.
There's no need for user.config.js as you keep suggesting.
I'll be happy to review your patch, feel free to scratch your own itch there
Ok thanks, I will give it a go soon.
I find it very useful. It's true that there are not many updates, but when there are updates it's a little disturbing to do the whole switch (although probably most users just have the bare config params on the config file, they use docker, or they simply update from sources not overriding the default config file, so this is why it's not a hassle for almost anyone). But I've always liked the approach of having user-specific config files for any software. It's super clean and very easy to maintain.
Feature Description
Every time I install the
.deb
package, it asks for a file override:Ideally, all packages with an updating system should have a user config file to avoid this.
For example, PHP package has a
/conf.d/
directory, any file like user.ini won't be overridden on update but will take over default variables.So for example, if I only want to modify the
max_execution_time
I can create there auser.ini
file and put there themax_execution_time = 900
or whatever. This user-defined variable will override the default behavior inphp.ini
What are the advantages of this?
config.js
if they don't plan to update or they don't care about dev maintained packages/updates, or they can choose to edituser.config.js
only with the variables they need (the rest will remain default. User can check the official config.js to see if there are new configurations (or some are deprecated or about to be deprecated), after updates without the hassle of having to check and implement diffs during the update (which is a massive waste of time for sysadmins)