qmsk / e2

E2 Client, Tally output
Mozilla Public License 2.0
26 stars 7 forks source link

Support for passing option defaults via environment variables #50

Open SpComb opened 4 years ago

SpComb commented 4 years ago

The various command-line options defined by the packages should use the go-flags env, env-delim support to allow passing options via environment variables.

This would make configuring the EnvironmentFile=/etc/default/qmsk-e2-tally options much easier in terms of syntax: #49

I do want to mention that the file for the designation of the Tally GPIO pins needs to be addressed. In the /etc/default qmsk-e2-tally file, not only do you have to remove the comments "#", but there is an extra blank line that needs to be removed as well.

The go-flags package that we use supports setting option default values from environment variables, so the tally gpio options could be improved to support separate environment variables like TALLY_GPIO_PIN_GREEN=23, TALLY_GPIO_PIN_RED=24, TALLY_GPIO_PINS=... etc, which would make the /etc/default/qmsk-e2-tally much easier to use.