From: Andrew Lewis Date: Sun, 11 Jun 2017 20:28:25 +0000 (+0200) Subject: [Minor] RPM/DEB: fix log directory ownership on systemd platforms X-Git-Tag: 1.6.0~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=063d7483312f20db5d2a07ed791d9d5ee40de5e3;p=rspamd.git [Minor] RPM/DEB: fix log directory ownership on systemd platforms --- 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