]> arthur.barton.de Git - netdata.git/commitdiff
have default logrotate file work in all cases - even if netdata is not managed by...
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 15 May 2016 19:46:58 +0000 (22:46 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 15 May 2016 19:46:58 +0000 (22:46 +0300)
system/netdata.logrotate.in

index 763eb09c930d66aa1d1d5ee25fc037d7c6419fff..e77d5ff72bf0b3bc289c32ed67f4ec97020bd47a 100644 (file)
@@ -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
 }
-