[systemd-devel] how make reload=restart

Alexey Shabalin a.shabalin at gmail.com
Tue May 10 09:50:41 PDT 2011


2011/5/10 Lennart Poettering <lennart at poettering.net>:
> 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.

Can i use in rsyslog.service?
ExecReload=/bin/systemctl restart rsyslog.service

-- 
Alexey Shabalin


More information about the systemd-devel mailing list