[systemd-devel] how make reload=restart

Lennart Poettering lennart at poettering.net
Tue May 10 09:44:06 PDT 2011


On Tue, 10.05.11 20:03, Alexey Shabalin (a.shabalin at gmail.com) wrote:

> Hello!
> 
> Our logrotate after finish run script syslog-reload (detect syslog
> daemon - sysklogd or syslog-ng or rsyslog, and run service foo reload)
> But some services do not support reload, for example rsyslog.
> In init.d/rsyslog i can add reload=restart
> Very necessary add option to foo.service like
> Reload=Restart
> or
> ExecReload=Restart

reloading implies that a service stays available all the
time. restarting usually means there's a window where the service is not
available. We do not want to blur this difference in systemd, hence we
do not turn reload requests into restart requests automatically.

If you want an automatic fallback to restarting if reloading is not
available for a service please use "systemctl reload-or-restart ..."
which will to exactly that for you.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list