fanshim-python icon indicating copy to clipboard operation
fanshim-python copied to clipboard

Daemon settings should be in a config file, not hard coded into the unit

Open ali1234 opened this issue 4 years ago • 1 comments

Currently the setup script generates a unit file with the settings (on/off temperature etc) hardcoded into the command line. This has a few problems:

  • The settings are difficult to find.
  • It is necessary to run an obscure systemd command if you edit the unit file.
  • It makes maintenance harder if you want to upgrade that script and people have edited it.

The solution is to put the settings into an external configuration file. This could be coded in to the python script but the easier way is to just use a systemd environment file. If you want I'll send a pull request for the latter in the next few days.

ali1234 avatar Jul 22 '19 18:07 ali1234

I've somehow not come across systemd environment files before, it looks like a reasonable approach.

Totally onboard with using a config file, it's been in the back of my mind for a while now and I'd appreciate a PR if you're up for it.

Gadgetoid avatar Jul 23 '19 08:07 Gadgetoid