section | x-masysma-name | title | date | lang | author | keywords | x-masysma-version | x-masysma-repository | x-masysma-website | x-masysma-owned | x-masysma-copyright | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32 |
trivial_automatic_update |
Trivial Automatic Update |
2020/08/21 22:24:45 |
en-US |
|
|
1.0.0 |
1 |
Copyright (c) 2020 Ma_Sys.ma.
For further info send an e-mail to Ma_Sys.ma@web.de.
|
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
.
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
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 the
RELEASENAME-updates
repository and thus the corresponding lines is only
generated if USE_LTS=0
is set.
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
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.