From: Costa Tsaousis (ktsaou) Date: Sun, 15 May 2016 19:46:58 +0000 (+0300) Subject: have default logrotate file work in all cases - even if netdata is not managed by... X-Git-Tag: v1.2.0~2^2 X-Git-Url: https://arthur.barton.de/gitweb/?p=netdata.git;a=commitdiff_plain;h=a7ac0e6a733f53c4cbe6e26fae2f5ad85908fb91 have default logrotate file work in all cases - even if netdata is not managed by init.d/systemd --- diff --git a/system/netdata.logrotate.in b/system/netdata.logrotate.in index 763eb09c..e77d5ff7 100644 --- a/system/netdata.logrotate.in +++ b/system/netdata.logrotate.in @@ -6,10 +6,16 @@ delaycompress notifempty sharedscripts - postrotate - if service netdata status > /dev/null ; then \ - service netdata restart > /dev/null; \ - fi; - endscript + # + # if you add netdata to your init.d/system.d + # comment su & copytruncate and uncomment postrotate + # to have netdata restart when logs are rotated + su netdata + copytruncate + # + #postrotate + # if service netdata status > /dev/null ; then \ + # service netdata restart > /dev/null; \ + # fi; + #endscript } -