Konstantin Ryabitsev <konstan...@linuxfoundation.org> wrote:
> On Mon, Jul 19, 2021 at 08:49:35PM +0000, Eric Wong wrote:
> > > The best I can think of is a systemd watcher service that automatically
> > > restarts the daemons when the config file is modified, but I wanted to 
> > > check
> > > here first to see if perhaps I'm missing something simpler.
> > 
> > Yes, a systemd.path unit might be the way to go.  A patch for
> > examples/ would be appreciated if you go down that route :>
> 
> Okay, let me see what I can come up with. Looks like the best course of action
> is to:
> 
> 1. use a global blocking lock
> 2. copy the config file to a new location
> 3. make the necessary changes to the temporary config file
> 4. move the temp config file to overwrite the current config
> 5. release the lock

public-inbox-init already does all of that.  It doesn't set
all possible keys, yet (e.g. infourl, maybe some others).

> This would make sure that there is are no races and that all changes show up
> at once and don't repeatedly trigger the path watcher.
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to