Feature Requests
New / Open / Unreviewed

[Feature Request] Send update on package install/update/removal

Idea

It would be great to send an update automatically on package install/update/removal. Thus, we would always have an up-to-date info.

Potential solutions

APT:

sudo tee /etc/apt/apt.conf.d/06patchmon > /dev/null <<'EOF'
DPkg::Post-Invoke { "if [ -x /usr/local/bin/patchmon-agent.sh ] ; then echo 'Sending report to PatchMon server...' ; /usr/local/bin/patchmon-agent.sh update >/dev/null 2>&1 ; fi"; };
EOF

DNF:

dnf -y install python3-dnf-plugin-post-transaction-actions
sudo tee /etc/dnf/plugins/post-transaction-actions.d/patchmon.action > /dev/null <<'EOF'
*:any:/usr/local/bin/patchmon-agent.sh update >/dev/null 2>&1
EOF

In case of implementing, existing cron jobs could be reviewed accordingly.

2 Comments

Posting anonymously

9technologygroup·6 months ago

This will now part of the patching module.

We have the ability to fetch reports from the server but the patching module is going to have a hook in to refresh when updates have happened.

Posting anonymously

9technologygroup·10 months ago

Yes, I agree with this. There are a few ways of doing this and yours is also a valid method.

We will be changing the cron method away from utilising crontab towards leveraging systemd timer. In the same breath I will have a look at how we can have it more event-driven architecture as opposed to request/response.

I've marked this for 1.2.9 , released are every Friday.

Posting anonymously