Description
Package mdvl-trivial-automatic-update
supplies a systemd
timer for periodically invoking unattended-upgrades
and
permits multiple mirrors where the first one to be online is chosen.
This allows upgrading a server from a local mirror which is preferred if
it is online but allows running on another mirror for fallback.
To use a mirror depending on which is online,
/etc/apt/sources.list
is temporarily replaced with a
script-created one before invoking the actual
unattended-upgrades
.
Compilation and Installation
The package can be generated by calling ant package
on a
Debian system with the necessary tools to build packages and
ant
installed. Alternatively, the repository for megasync(32) includes a compiled version of
this package: https://github.com/m7a/lo-megasync/blob/master/mdvl-trivial-automatic-update_1.0.3_all.deb?raw=true.
Installation can be performed with apt as follows:
# apt install ./mdvl-trivial-automatic-update*all.deb
Afterwards, the update process can be enabled by calling
# systemctl enable mdvl-trivial-automatic-update.timer
If you want to test how it runs before enabling the timer, run
# systemctl start mdvl-trivial-automatic-update.service
and then check the outputs of
# systemctl status mdvl-trivial-automatic-update.service
# journalctl -u mdvl-trivial-automatic-update.service
Configuration
The package is configured by file
/etc/ma_trivial_automatic_update.conf
which looks as
follows:
# This configuration is sourced by
# /usr/local/bin/ma_trivial_automatic_update
# MIRRORLIST: space-separated list of mirror addresses to check.
MIRRORLIST="192.168.1.16 ftp.de.debian.org"
# USE_LTS: if 1 disable version-update line.
USE_LTS=0
Two settings are available:
MIRRORLIST
-
Lists all mirrors to consult. The first one listed is preferred. In the
default configuration, a local mirror is expected to be present at
192.168.1.16
and if it is offline,ftp.de.debian.org
is used instead. USE_LTS
-
This setting can either be 0 or 1 and configures the
sources.list
to use for upgrading: Debian LTS does not include support for theRELEASENAME-updates
repository and thus the corresponding lines is only generated ifUSE_LTS=0
is set.
Files
ma_trivial_automatic_update.conf |
Configuration |
mdvl-trivial-automatic-update.service |
Systemd service unit |
mdvl-trivail-automatic-update.timer |
Systemd timer |
ma_trivial_automatic_update |
Checks mirror status and calls
unattended-upgrades |
build.xml and
debian-changelog.txt |
Package metadata |
Use cases
Automatic updates are always a little risky and not recommended for systems that see a large fluctuation in the types of software installed because there, updates may often introduce problems. For regular Debian stable systems, however, updates are often stable enough to permit automatic installation.
This package is intended to be used on small, single-purpose servers, virtual machines and inside containers.