reynoldsbd / lunacam

Camera streaming system for Raspberry Pi
Apache License 2.0
13 stars 1 forks source link

Configuration changes #4

Open reynoldsbd opened 5 years ago

reynoldsbd commented 5 years ago

Currently, changes to LunaCam configuration require manually editing /etc/lunacam/config.json on the Pi and restarting lunacam.service.

Eventually, it should be possible to change configuration via the Web UI. Additionally, such changes should generally not require any restart.

Proposal

Move config.json under /var, into some directory accessible by the lunacam user (which we can setup using tmpfiles.d). When the user makes a configuration change using the web UI, the server process should then:

  1. reload any run-time components to observe the configuration change (e.g. reloading templates or restarting the HTTP server)
  2. flush an updated config.json onto disk
reynoldsbd commented 5 years ago

Work is in progress. The config module provides a read/write configuration store suitable for use by multiple components.

Still a few open issues: