I have configured unattended-upgrades to run automatically on an Ubuntu Server 18.04. This is working as intended.
How can I check the result of the last unattended-upgrades run through a bash script? In particular, I want to detect if downloading update repository lists or downloading or installing any updated package has failed, for whatever reason. I don't need access to error messages, a single boolean flag whether the unattended upgrade succeeded or failed is sufficient. This information will later be used to indicate whether human interaction is required.
Clarification: I do not want to access the current unattended upgrades status, I want to access the result (success/failure) of the last time unattended upgrades ran.