summaryrefslogtreecommitdiff
path: root/debian/61-apt.rules
diff options
context:
space:
mode:
authorAlessandro Astone <alessandro.astone@canonical.com>2026-01-23 14:29:57 +0100
committerJulian Andres Klode <jak@debian.org>2026-02-17 10:32:07 +0000
commit31cbb48a36060e59e5e05a718553334c74e20286 (patch)
tree59001fcf0be7272453db3e7ded097a23f9b524d2 /debian/61-apt.rules
parentf6adace8d302fb72ab92646cbd49f9560fa1ad6a (diff)
debian: Trigger apt-daily on AC plug event
Because the service has ConditionACPower=true, it would be nice to try and start it when plugging-in the AC power in case that an earlier timer trigger was missed due to not being plugged-in. It is not a problem that we may be invoking the service multiple times a day, because it keeps track of its own timestamp file to run up to once every "APT::Periodic::Update-Package-Lists" days Related: https://launchpad.net/bugs/2089151
Diffstat (limited to 'debian/61-apt.rules')
-rw-r--r--debian/61-apt.rules1
1 files changed, 1 insertions, 0 deletions
diff --git a/debian/61-apt.rules b/debian/61-apt.rules
new file mode 100644
index 000000000..63e32162c
--- /dev/null
+++ b/debian/61-apt.rules
@@ -0,0 +1 @@
+ACTION=="change", SUBSYSTEM=="power_supply", KERNEL=="AC", ATTR{online}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}+="apt-daily.service"