summaryrefslogtreecommitdiff
path: root/debian
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
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')
-rw-r--r--debian/61-apt.rules1
-rw-r--r--debian/apt.install1
2 files changed, 2 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"
diff --git a/debian/apt.install b/debian/apt.install
index 40bcfcf10..1d0aaa8db 100644
--- a/debian/apt.install
+++ b/debian/apt.install
@@ -1,5 +1,6 @@
debian/*.service /usr/lib/systemd/system/
debian/*.timer /usr/lib/systemd/system/
+debian/61-apt.rules /usr/lib/udev/rules.d/
debian/apt.systemd.daily usr/lib/apt
debian/default-sequoia.config usr/share/apt/
etc/apt/