Browse Source

Split apt-daily timer into two

The timer doing downloading runs throughout the day, whereas
automatic upgrade and clean actions only happen in the morning.

The upgrade service and timer have After= ordering requirements
on their non-upgrade counterparts to ensure that upgrading at
boot takes place after downloading.

LP: #1686470
tags/devuan/2.0.1+devuan1
Julian Andres Klode 3 years ago
parent
commit
496313fb8e
5 changed files with 26 additions and 6 deletions
  1. +9
    -0
      debian/apt-daily-upgrade.service
  2. +11
    -0
      debian/apt-daily-upgrade.timer
  3. +2
    -2
      debian/apt-daily.service
  4. +3
    -3
      debian/apt-daily.timer
  5. +1
    -1
      debian/rules

+ 9
- 0
debian/apt-daily-upgrade.service View File

@@ -0,0 +1,9 @@
[Unit]
Description=Daily apt upgrade and clean activities
Documentation=man:apt(8)
ConditionACPower=true
After=apt-daily.service

[Service]
Type=oneshot
ExecStart=/usr/lib/apt/apt.systemd.daily install

+ 11
- 0
debian/apt-daily-upgrade.timer View File

@@ -0,0 +1,11 @@
[Unit]
Description=Daily apt upgrade and clean activities
After=apt-daily.timer

[Timer]
OnCalendar=*-*-* 6:00
RandomizedDelaySec=60m
Persistent=true

[Install]
WantedBy=timers.target

+ 2
- 2
debian/apt-daily.service View File

@@ -1,9 +1,9 @@
[Unit]
Description=Daily apt activities
Description=Daily apt download activities
Documentation=man:apt(8)
ConditionACPower=true

[Service]
Type=oneshot
ExecStart=/usr/lib/apt/apt.systemd.daily
ExecStart=/usr/lib/apt/apt.systemd.daily update


+ 3
- 3
debian/apt-daily.timer View File

@@ -1,11 +1,11 @@
[Unit]
Description=Daily apt activities
Description=Daily apt download activities
After=network-online.target
Wants=network-online.target

[Timer]
OnCalendar=*-*-* 6:00
RandomizedDelaySec=60m
OnCalendar=*-*-* 6,18:00
RandomizedDelaySec=12h
Persistent=true

[Install]


+ 1
- 1
debian/rules View File

@@ -37,7 +37,7 @@ override_dh_systemd_start:
# Do not restart "apt-daily.service" because this script runs
# unattended-upgrades. So if apt itself is upgraded as part of
# an unattended-upgrades run it would kill itself
dh_systemd_start apt-daily.timer
dh_systemd_start apt-daily.timer apt-daily-upgrade.timer

override_dh_auto_configure-arch: flags=-DWITH_DOC=OFF
override_dh_auto_configure-indep: flags=-DWITH_DOC=ON


Loading…
Cancel
Save