Re: Samba Config Reload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Do, 07.04.22 15:38, Kenneth Porter (shiva@xxxxxxxxxxxxxxx) wrote:

> --On Thursday, April 07, 2022 12:30 PM +0200 Lennart Poettering
> <mzerqung@xxxxxxxxxxx> 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



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux