summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/sssd.spec.in5
-rw-r--r--src/Makefile.am1
-rw-r--r--src/examples/logrotate11
3 files changed, 17 insertions, 0 deletions
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 95c6a11a..3acecd3c 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -230,6 +230,10 @@ install -m600 src/examples/sssd.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.con
install -m400 src/config/etc/sssd.api.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.conf
install -m400 src/config/etc/sssd.api.d/* $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.d/
+# Copy default logrotate file
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
+install -m644 src/examples/logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sssd
+
# Remove .la files created by libtool
rm -f \
$RPM_BUILD_ROOT/%{_lib}/libnss_sss.la \
@@ -284,6 +288,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(750,root,root) %dir %{_var}/log/%{name}
%attr(700,root,root) %dir %{_sysconfdir}/sssd
%config(noreplace) %{_sysconfdir}/sssd/sssd.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/sssd
%config %{_sysconfdir}/sssd/sssd.api.conf
%attr(700,root,root) %dir %{_sysconfdir}/sssd/sssd.api.d
%config %{_sysconfdir}/sssd/sssd.api.d/
diff --git a/src/Makefile.am b/src/Makefile.am
index 93de6630..aa7fccb9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -389,6 +389,7 @@ dist_noinst_DATA += \
examples/sssd.conf \
examples/sssdproxytest \
examples/sudo \
+ examples/logrotate \
providers/sssd_be.exports \
sss_client/COPYING \
sss_client/COPYING.LESSER \
diff --git a/src/examples/logrotate b/src/examples/logrotate
new file mode 100644
index 00000000..9df721f2
--- /dev/null
+++ b/src/examples/logrotate
@@ -0,0 +1,11 @@
+/var/log/sssd/*.log {
+ weekly
+ missingok
+ notifempty
+ sharedscripts
+ rotate 2
+ compress
+ postrotate
+ /bin/kill -HUP `cat /var/run/sssd.pid 2>/dev/null` 2> /dev/null || true
+ endscript
+}