Trivial Automatic Update


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:

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.
# USE_LTS: if 1 disable version-update line.

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 at and if it is offline, 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 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

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. Website 5 (1.0.2) – no Flash, no JavaScript, no Webfont, no Copy Protection, no Mobile First. No bullshit. No GUI needed. Works with any browser.

Created: 2020/08/21 22:24:45 | Revised: 2022/09/18 21:18:45 | Tags: mdvl, debian, update, automatic, package | Version: 1.0.0 | SRC (Pandoc MD) | GPL

Copyright (c) 2020 For further info send an e-mail to

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <>.