mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
- Implement listening for CacheUpdated notification. - Configuration to allow only root to trigger the notification. - Trigger the notification from an apt update hook. - Retrieve the list of packages available for upgrade and print them to log. - Add dependency on libglib2.0-bin for the gdbus command line tool. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
9 lines
543 B
Plaintext
9 lines
543 B
Plaintext
// This configuration is installed by FreedomBox.
|
|
//
|
|
// When Apt's cache is updated (i.e. apt-cache update) notify FreedomBox service
|
|
// via it's D-Bus API. FreedomBox may then handle upgrade of some packages.
|
|
//
|
|
APT::Update::Post-Invoke-Success {
|
|
"/usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedombox.Service --object-path /org/freedombox/Service/PackageHandler --timeout 10 --method org.freedombox.Service.PackageHandler.CacheUpdated 2> /dev/null > /dev/null; /bin/echo > /dev/null";
|
|
};
|