nextcloud / nextcloud-talk-recording

GNU Affero General Public License v3.0
13 stars 4 forks source link

Reload configuration while the recording server is running #18

Open danxuliu opened 8 months ago

danxuliu commented 8 months ago

Right now if the configuration file is changed the recording server needs to be stopped and started again to use the new configuration. Therefore it is needed to manually check whether there is an active recording and then wait until it is finished before restarting the server (or to just restart the server right away, killing the recording).

It should be possible to reload the configuration while the recording server is running. This would make possible, for example, to allow additional backends or signaling servers without interfering in active recordings. Note, however, that not all values might be reloadable without restarting (for example, the listening IP address and port might need the recording server to be fully restarted). It is also expected that the values will not be applied to active recordings, but only to recordings started after the reload (for example, the encoding settings).

For consistency with the signaling server the configuration should be reloaded by sending a SIGHUP signal to the recording server. An ExecReload entry (ExecReload=/bin/kill -HUP $MAINPID) should be added to the systemd service file so the service can be reloaded with systemctl reload nextcloud-talk-recording.