summaryrefslogtreecommitdiff
path: root/debian/apt.apt-compat.cron.daily
Commit message (Collapse)AuthorAgeFilesLines
* Use `command -v` instead of `which`Ville Skyttä2021-11-041-1/+1
| | | | | | | | | | `which` has been deprecated in debianutils 5.0+. The recommended replacement, `command -v`, is mandated by Debian policy these days, in addition to being required by POSIX and its predecessor specs at least since 1994. Not found commands cause no output from `command -v` per POSIX, so remove the redundant 2>&1's while at it.
* apt-compat.cron.daily: Correctly handle undetermined power statusJulian Andres Klode2018-01-101-3/+3
| | | | | | | | If on_ac_power exits with 255 the script would fail at this point because set -e was set, but it should continue, as 255 means the power status could not be determined. LP: #1742378
* Use the ConditionACPower feature of systemd in the apt-daily serviceNicolas Le Cam2016-06-271-1/+23
| | | | | | | | | | .. instead of hardcoding the functionnality in the apt.systemd.daily script. Also make the compatibility cron job provide the same functionnality for systems that do not use systemd. Closes: #827930
* Use systemd.timer instead of a cron jobMichael Vogt2016-04-011-0/+33
The rational is that we need to spread the load on the mirrors that apt update and unattended-upgrades cause. To do so, we leverage the RandomizeDelay feature of systemd. The other advantage is that the timer is not run at a fixed daily.daily time but instead every 24h. This also fixes the problem that the randomized deplay in the current apt.cron.daily causes other cron jobs to be deplayed. A compatibility cron job is also provided for systems that do not use systemd. Note that the time is fired two times a day, but the logic inside of apt.systemd.daily will ensure (via stamp files) that the servers are hit at most every 24h. Firing two times a day helps with the worst case update time and it also helps with systems that are not always on. LP: #246381, #727685 Closes: #600262, #709675, #663290