Ubuntu 22.04 Unattended Upgrades: apt hook usage, for command execution after successful updates | pressku.com

Trending 3 months ago

I looked astatine nan commands executed aft a successful update, successful /etc/apt/apt.conf.d:

# feline 15update-stamp APT::Update::Post-Invoke-Success {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";};

So I created a record pinch nan content:

# feline 90rpi-firmware-purge APT::Update::Post-Invoke-Success {"find /boot/firmware -type f -name '*.bak' -delete 2>/dev/null || true";};

However, aft nan unattended upgrade runs, nan bak files are not deleted. Which leads maine to judge nan existent bid is not executed successfully. If I tally nan bid manually arsenic guidelines user, nan files are deleted.

I noticed that immoderate files usage a different hook:

# feline 99needrestart DPkg::Post-Invoke {"test -x /usr/lib/needrestart/apt-pinvoke && /usr/lib/needrestart/apt-pinvoke || true"; };

I'm trying to understand wherever nan rumor could be. I besides retrieve that sometimes Linux requires nan afloat way to executable, successful a script, /usr/bin/find alternatively of find. Could this beryllium nan bid nonaccomplishment cause?

I'm wondering besides successful what logs I could cheque if location are immoderate bid execution failures. Thank you for your help.