@cryptotaxi247 / netdata-1 / commits / 20d02ef9a

Add logrotate configuration

Matthew Newton committed Apr 3, 2016 at 21:12 UTC 20d02ef9a8263ade48fe5480edf36725529e5487
2 files changed +18
system/Makefile.am
+3
@@ -4,6 +4,7 @@
4 MAINTAINERCLEANFILES= $(srcdir)/Makefile.in
5 CLEANFILES = \
6 netdata-openrc \
7 + netdata.logrotate \
8 netdata.service \
9 netdata-init-d \
10 $(NULL)
@@ -14,12 +15,14 @@ SUFFIXES = .in
15
16 nodist_noinst_DATA = \
17 netdata-openrc \
18 + netdata.logrotate \
19 netdata.service \
20 netdata-init-d \
21 $(NULL)
22
23 dist_noinst_DATA = \
24 netdata-openrc.in \
25 + netdata.logrotate.in \
26 netdata.service.in \
27 netdata-init-d.in \
28 $(NULL)
system/netdata.logrotate.in new
+15
@@ -0,0 +1,15 @@
1 +@localstatedir_POST@/log/netdata/*.log {
2 + daily
3 + missingok
4 + rotate 14
5 + compress
6 + delaycompress
7 + notifempty
8 + sharedscripts
9 + postrotate
10 + if service netdata status > /dev/null ; then \
11 + service netdata restart > /dev/null; \
12 + fi;
13 + endscript
14 +}
15 +