On Tue, 18 May 2021 14:23:14 +0200 Michael Biebl <bi...@debian.org> wrote:
> On Tue, 18 May 2021 14:10:08 +0200 =?UTF-8?Q?Christian_G=C3=B6ttsche?=
> <cgzo...@googlemail.com> wrote:
> > > Based on Samuel's comment, modified /usr/lib/rsyslog/rsyslog-rotate
> > > #!/bin/sh
> > >
> > > if [-d /run/systemd/system]; then
> > > systemctl kill -s HUP --kill-who = main rsyslog.service
> > > else
> > > invoke-rc.d rsyslog rotate> /dev/null
> > > fi
> > > "
> > >
> > > Is it a bug or do I have an understanding problem somewhere?
> > >
>
> What exactly did you change in the script? Please post a diff (or the
> file before and after the modifications you did).
>
>

This is my actual file:

#!/bin/sh
#based on
#https://askubuntu.com/questions/695999/var-log-syslog-not-rotating

#if [ -d /run/systemd/system ]; then
#    systemctl kill -s HUP rsyslog.service
#else
#    invoke-rc.d rsyslog rotate > /dev/null
#fi

if [ -d /run/systemd/system ]; then
    systemctl kill -s HUP --kill-who=main rsyslog.service
else
    invoke-rc.d rsyslog rotate > /dev/null
fi

-----------------------------
 logrotate -v /etc/logrotate.conf        is running

 journalctl -u logrotate                         says:

-- Logs begin at Sat 2021-05-15 07:00:01 CEST, end at Tue 2021-05-18
14:51:27 CEST. --
Mai 16 00:00:01 debian64 systemd[1]: Starting Rotate log files...
Mai 16 00:00:03 debian64 systemd[1]: logrotate.service: Succeeded.
Mai 16 00:00:03 debian64 systemd[1]: Started Rotate log files.
Mai 17 00:00:01 debian64 systemd[1]: Starting Rotate log files...
Mai 17 00:00:03 debian64 systemd[1]: logrotate.service: Succeeded.
Mai 17 00:00:03 debian64 systemd[1]: Started Rotate log files.
Mai 18 00:00:01 debian64 systemd[1]: Starting Rotate log files...
Mai 18 00:00:02 debian64 systemd[1]: logrotate.service: Succeeded.
Mai 18 00:00:02 debian64 systemd[1]: Started Rotate log files.

It is the first time that I have made such a report via reportbug.
I can only hope that I comply with the reporting rules to some extent.

Reply via email to