I’m trying to set up dnf-automatic-install to
- call rkhunter --propupd when software is updated
- reboot when a new kernel is installed
I’m running Fedora 34, and using dnf-automatic, set to install any updates. I have added a ExecStopPost line to dnf-automatic-install.service, which calls a script:
ExecStopPost=/bin/sh -c '/root/bin/dnf-automatic-stop-post'
The problem is that this script is called every time dnf-automatic is run, even when no software is updated. How can I get it to run only after updates?
If I must, I’ll write a script that duplicates dnf-automatic, using the exit code from:
The documentation says it returns exit code 100 when there is updates, but it returns 0. Do I have to write a parser to solve this issue, or am I doing it wrong?
I’m trying to do what I want using the stock Fedora utilities, but when they don’t work as advertised, this makes it frustrating.