On Sun, Aug 01, 2021 at 10:41:13AM -0400, songbird wrote: > mick crane wrote: > > Doh! discovered have to restart scanbd.service after changing config > > file. > > You'd have thought I would know that. > > some will restart automatically when their config file changes > and others don't. you have to know which do and which don't > since this isn't a universal feature yet.
Very few programs poll for changes to their configuration files. That would be a sloppy design. If a program runs as a daemon (really running, i.e. you can see the process in the output of ps -ef), and you change its configuration file, you will typically need to take some action to notify the daemon that a change has occurred. This action may be sending a SIGHUP to the running daemon, or it may be restarting the daemon. If on the other hand a program is *not* continuously running as a daemon, but is instead started on demand (e.g. by inetd or by systemd's socket activation), then there's no need to take any action when the configuration is changed. The next instance of the program that gets launched will by necessity read the configuration file. So, in almost all cases, it's sufficient to figure out which of these two designs you're dealing with. Ideally, the documentation (the man page) of the daemon will tell you. In some cases, there are multiple ways the service can be implemented (sshd comes to mind), and so the man page has to list *both* possibilities, and *you* as the sysadmin have to know which one is actually being used on your system.