Logrotate not restarting rsyslog
logrotate is not sending HUP signal to rsyslog because of invalid command in postrotate/endscript block. Fixed the command to reload the rsyslog after the logs are rotated. Change-Id: Ia1fa205e6f20c212841109c914a8c7e2d379a48b
This commit is contained in:
parent
c902307da5
commit
c63290a0a4
|
@ -10,7 +10,7 @@
|
|||
{% if rsyslog_client_log_rotate_scripts | length > 0 %}
|
||||
{% for script in rsyslog_client_log_rotate_scripts %}
|
||||
{{ script.name }}
|
||||
{{ script.content }}
|
||||
{{ script.content | default(rsyslog_client_reload) }}
|
||||
endscript
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
|
@ -20,3 +20,5 @@
|
|||
rsyslog_client_distro_packages:
|
||||
- rsyslog
|
||||
- logrotate
|
||||
|
||||
rsyslog_client_reload: 'invoke-rc.d rsyslog rotate > /dev/null || true'
|
||||
|
|
|
@ -16,3 +16,5 @@
|
|||
rsyslog_client_distro_packages:
|
||||
- rsyslog
|
||||
- logrotate
|
||||
|
||||
rsyslog_client_reload: '/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true'
|
||||
|
|
Loading…
Reference in New Issue