[systemd-devel] how make reload=restart
Alexey Shabalin
a.shabalin at gmail.com
Tue May 10 09:47:04 PDT 2011
2011/5/10 "Jóhann B. Guðmundsson" <johannbg at gmail.com>:
> On 05/10/2011 04:03 PM, Alexey Shabalin 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
>>
>
Our logrotate script is universal. He support sysklogd, syslog-ng and rsyslog.
For sysklogd and syslog-ng (and old rsyslog) was enough send -HUP
signal after logrotate.
in man rsyslog-v5:
HUPing rsyslogd is an extremely expensive operation and should only
be done when
actually necessary. Actually, it is a rsyslgod stop immediately
followed by a restart. Future ver‐
sions will remove this restart functionality of HUP (it will go away
in v5). So it is advised to
use HUP only for closing files, and a "real restart" (e.g.
/etc/rc.d/rsyslogd restart) to activate
configuration changes.
--
Alexey Shabalin
More information about the systemd-devel
mailing list