@cryptotaxi247 / netdata-1 / commits / a7ac0e6a7

have default logrotate file work in all cases - even if netdata is not managed by init.d/systemd

Costa Tsaousis (ktsaou) committed May 15, 2016 at 22:46 UTC a7ac0e6a733f53c4cbe6e26fae2f5ad85908fb91
1 file changed +12 -6
system/netdata.logrotate.in
+12 -6
@@ -6,10 +6,16 @@
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
9 + #
10 + # if you add netdata to your init.d/system.d
11 + # comment su & copytruncate and uncomment postrotate
12 + # to have netdata restart when logs are rotated
13 + su netdata
14 + copytruncate
15 + #
16 + #postrotate
17 + # if service netdata status > /dev/null ; then \
18 + # service netdata restart > /dev/null; \
19 + # fi;
20 + #endscript
21 }
15 -