From: Vsevolod Stakhov Date: Tue, 17 Apr 2018 09:17:32 +0000 (+0100) Subject: [Fix] Fix CentOS logrotate script for systemd X-Git-Tag: 1.7.4~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3eda5a9aa5541daa3ae90e1f4055888bdf342500;p=thirdparty%2Frspamd.git [Fix] Fix CentOS logrotate script for systemd --- diff --git a/centos/rspamd.spec b/centos/rspamd.spec index d1d370327c..b16e070dee 100644 --- a/centos/rspamd.spec +++ b/centos/rspamd.spec @@ -47,8 +47,10 @@ Requires(post): chkconfig Requires(preun): chkconfig, initscripts Requires(postun): initscripts Source1: %{name}.init -%endif Source2: %{name}.logrotate +%else +Source2: %{name}.logrotate.systemd +%endif Source0: https://rspamd.com/downloads/%{name}-%{version}.tar.xz Source3: 80-rspamd.preset diff --git a/centos/sources/rspamd.logrotate.systemd b/centos/sources/rspamd.logrotate.systemd new file mode 100644 index 0000000000..f6536d058d --- /dev/null +++ b/centos/sources/rspamd.logrotate.systemd @@ -0,0 +1,11 @@ +/var/log/rspamd/*log { + daily + rotate 10 + missingok + notifempty + compress + sharedscripts + postrotate + export `systemctl -p MainPID show rspamd.service`; if [ -n "$MainPID" ]; then kill -USR1 $MainPID; fi + endscript +} \ No newline at end of file