diff options
author | Matthew Newton <mcn4@leicester.ac.uk> | 2016-04-03 21:12:54 +0100 |
---|---|---|
committer | Matthew Newton <mcn4@leicester.ac.uk> | 2016-04-08 23:20:26 +0100 |
commit | 20d02ef9a8263ade48fe5480edf36725529e5487 (patch) | |
tree | 4e47b94240b1d96f0b1c762059c3a7cbbb5ea615 /system | |
parent | ee7751c588f8808876832085468036d955ed38a2 (diff) |
Add logrotate configuration
Diffstat (limited to 'system')
-rw-r--r-- | system/Makefile.am | 3 | ||||
-rw-r--r-- | system/netdata.logrotate.in | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/system/Makefile.am b/system/Makefile.am index 49cb5f7bc1..e20cdd74c7 100644 --- a/system/Makefile.am +++ b/system/Makefile.am @@ -4,6 +4,7 @@ MAINTAINERCLEANFILES= $(srcdir)/Makefile.in CLEANFILES = \ netdata-openrc \ + netdata.logrotate \ netdata.service \ netdata-init-d \ $(NULL) @@ -14,12 +15,14 @@ SUFFIXES = .in nodist_noinst_DATA = \ netdata-openrc \ + netdata.logrotate \ netdata.service \ netdata-init-d \ $(NULL) dist_noinst_DATA = \ netdata-openrc.in \ + netdata.logrotate.in \ netdata.service.in \ netdata-init-d.in \ $(NULL) diff --git a/system/netdata.logrotate.in b/system/netdata.logrotate.in new file mode 100644 index 0000000000..763eb09c93 --- /dev/null +++ b/system/netdata.logrotate.in @@ -0,0 +1,15 @@ +@localstatedir_POST@/log/netdata/*.log { + daily + missingok + rotate 14 + compress + delaycompress + notifempty + sharedscripts + postrotate + if service netdata status > /dev/null ; then \ + service netdata restart > /dev/null; \ + fi; + endscript +} + |