Trivial Automatic Update
Copyright (c) 2020 Ma_Sys.ma. For further info send an e-mail to Ma_Sys.firstname.lastname@example.org.
mdvl-trivial-automatic-update supplies a systemd timer for
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,
temporarily replaced with a script-created one before invoking the actual
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
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
The package is configured by file
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:
: Lists all mirrors to consult. The first one listed is preferred.
In the default configuration, a local mirror is expected to be present
192.168.1.16 and if it is offline,
ftp.de.debian.org is used instead.
: This setting can either be 0 or 1 and configures the
sources.list to use
for upgrading: Debian LTS does not include support for the
RELEASENAME-updates repository and thus the corresponding lines is only
USE_LTS=0 is set.
mdvl-trivial-automatic-update.service Systemd service unit
mdvl-trivail-automatic-update.timer Systemd timer
ma_trivial_automatic_update Checks mirror status and calls
debian-changelog.txt Package metadata
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.