Browse Source

[Fix] Fix CentOS logrotate script for systemd

tags/1.7.4
Vsevolod Stakhov 6 years ago
parent
commit
3eda5a9aa5
2 changed files with 14 additions and 1 deletions
  1. 3
    1
      centos/rspamd.spec
  2. 11
    0
      centos/sources/rspamd.logrotate.systemd

+ 3
- 1
centos/rspamd.spec View File

@@ -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

+ 11
- 0
centos/sources/rspamd.logrotate.systemd View File

@@ -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
}

Loading…
Cancel
Save