script and conf to catch dnf-automatic output

Clive Lin <clive-zR8tn5/[email protected]> Sun, 8 Sep 2024 12:23:10 +0800
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <CAB3+JoozrwfFT=mRUNyfqPTqdeN86huTb5Y2B96zXENyETUvfg@mail.gmail.com>
Hello developers,

    Due to the eol of centos 7 this year, I have migrated some of my
home lab services to centos stream 9. In this distribution, yum-cron
has been replaced by dnf-automatic, and logwatch does not capture
dnf-automatic output.

    Since the output is well summarized, I created a simple script and
configuration for logwatch to capture it. I am sharing these files
here for further testing, as I currently only have centos stream 9 and
logwatch 7.5.5.

    To test, simply copy these two files on gist

https://gist.github.com/evi1c/d02ed4a47478c098ba59dbc0663d0493

    to these locations accordingly

dnf-automatic.conf -> /etc/logwatch/conf/services/dnf-automatic.conf
dnf-automatic -> /etc/logwatch/scripts/services/dnf-automatic

Cheers,
clive