I guess you are right about that it not should cause any harm. I just thought it was some misstake and it should be weewx that should restart instead.
But any way. In Ubuntu it works fine with rotating without restarting either rsyslog or weewx. Mine has rotate the logs now 3 times without problems. Den onsdag 13 december 2017 kl. 17:17:45 UTC+1 skrev Andrew Milner: > > looks as though centos once had a problem .... > https://www.centos.org/forums/viewtopic.php?t=32715 > > guess the stop and start may not be necessary nowadays - but they should > not cause any harm either > > > > On Wednesday, 13 December 2017 16:58:01 UTC+2, Daniel Jönsson wrote: > >> Sorry, I meant syslog, as I also wrote in the first post. >> >> >> Den onsdag 13 december 2017 kl. 15:36:53 UTC+1 skrev Andrew Milner: >>> >>> My logrotate stops and starts syslog at postrotate, it does not restart >>> logrotate. >>> >>> /var/log/weewx.log { >>> weekly >>> missingok >>> rotate 52 >>> compress >>> delaycompress >>> notifempty >>> # debian uses root:adm >>> # create 644 root adm >>> # ubuntu uses syslog:adm >>> # create 644 syslog adm >>> sharedscripts >>> postrotate >>> # standard way of invoking rc scripts >>> /etc/init.d/rsyslog stop >>> /etc/init.d/rsyslog start >>> >>> >>> On Wednesday, 13 December 2017 15:56:42 UTC+2, Daniel Jönsson wrote: >>> >>>> I understand. I am only familiar with Debian/Ubuntu so I can not help >>>> you with that. >>>> And to me it seemed strange. Some times you restart/reload the >>>> service/demaon, but I have never seen that a logrotate is restarting >>>> logrotate... >>>> >>>> >>>> >>>> Den onsdag 13 december 2017 kl. 12:42:38 UTC+1 skrev mwall: >>>>> >>>>> On Wednesday, December 13, 2017 at 4:36:01 AM UTC-5, Daniel Jönsson >>>>> wrote: >>>>>> >>>>>> In this logrotate example you are restarting rsyslog postrotate!! Why? >>>>>> >>>>> >>>>> restarting rsyslog is probably not necessary for the most recent >>>>> operating systems. >>>>> >>>>> i found that on some systems, logrotate did not manage open file >>>>> handles properly. when logrotate rotated the weewx log file, (r)syslog >>>>> would continue to write to the log that had been rotated. >>>>> >>>>> do you know of a way to ensure proper logrotate behavior that works on >>>>> all operating systems and all operating system versions? >>>>> >>>>> m >>>>> >>>> -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
