fanshim-python
fanshim-python copied to clipboard
Daemon settings should be in a config file, not hard coded into the unit
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.
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.