[systemd-devel] Samba Config Reload
Lennart Poettering
lennart at poettering.net
Fri Apr 8 11:49:40 UTC 2022
On Do, 07.04.22 15:38, Kenneth Porter (shiva at sewingwitch.com) wrote:
> --On Thursday, April 07, 2022 12:30 PM +0200 Lennart Poettering
> <mzerqung at 0pointer.de> wrote:
>
> > The other two options are likely similar, i.e. synchronous and talk to
> > smbd directly. But I don't know samba that well, so it's just an
> > assumption. In fact, if ExecStop= in smbd.service just calls the
> > smbcontrol they behave very very similar.
>
> FWIW, here's the unit file from samba-4.10.16-13 in CentOS 7.9:
>
…
> ExecReload=/bin/kill -HUP $MAINPID
This could be done better. Plugging in just a "kill" here, means the
reload is async. i.e. "systemctl reload" will basically return
immediately without the reload being complete, thus subsequent
commands can't rely the new config is already in place.
It's typically nicer to invoke some synchronous command from
ExecReload=.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list