diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-05-15 22:46:58 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-05-15 22:46:58 +0300 |
commit | a7ac0e6a733f53c4cbe6e26fae2f5ad85908fb91 (patch) | |
tree | ea523e1a049cfc3c45aa677ba547e8b639ab33a1 /system | |
parent | 01a26a31e1ae391eee891d8f888046ccd37609d3 (diff) |
have default logrotate file work in all cases - even if netdata is not managed by init.d/systemd
Diffstat (limited to 'system')
-rw-r--r-- | system/netdata.logrotate.in | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/system/netdata.logrotate.in b/system/netdata.logrotate.in index 763eb09c93..e77d5ff72b 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 } - |