summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-06-11 22:28:25 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-06-11 22:28:25 +0200
commit063d7483312f20db5d2a07ed791d9d5ee40de5e3 (patch)
tree3eedd4aa78413c38c5a321f53ed3df6ebf27d1fc
parent26dbf42826d6548d6ee566c1c8140fbcee7fe13b (diff)
downloadrspamd-063d7483312f20db5d2a07ed791d9d5ee40de5e3.tar.gz
rspamd-063d7483312f20db5d2a07ed791d9d5ee40de5e3.zip
[Minor] RPM/DEB: fix log directory ownership on systemd platforms
-rw-r--r--centos/rspamd.spec6
-rwxr-xr-xdebian/rules1
2 files changed, 6 insertions, 1 deletions
diff --git a/centos/rspamd.spec b/centos/rspamd.spec
index 0e7819c0b..125682e91 100644
--- a/centos/rspamd.spec
+++ b/centos/rspamd.spec
@@ -110,9 +110,13 @@ lua.
%if 0%{?el6}
%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
%{__install} -d -p -m 0755 %{buildroot}%{_localstatedir}/run/rspamd
-%endif
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -d -p -m 0755 %{buildroot}%{rspamd_logdir}
+%else
+%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+%{__install} -d -p -m 0755 %{buildroot}%{rspamd_logdir}
+%{__chown} %{rspamd_user}:%{rspamd_group} %{buildroot}%{rspamd_logdir}
+%endif
%{__install} -d -p -m 0755 %{buildroot}%{rspamd_home}
%{__install} -p -D -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/local.d/
diff --git a/debian/rules b/debian/rules
index 224478f32..b512a6576 100755
--- a/debian/rules
+++ b/debian/rules
@@ -47,3 +47,4 @@ override_dh_auto_clean:
override_dh_fixperms:
dh_fixperms
chmod 750 $(CURDIR)/debian/rspamd/var/lib/rspamd
+ chmod 750 $(CURDIR)/debian/rspamd/var/log/rspamd