upgrades: Add service for dist upgrade

Only restart plinth if needed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2021-01-10 20:43:40 -08:00
1 parent 66b0238146
commit 8934c22ef3
3 files changed
+38 -24

No files matched your search

+3 -5
View File
@@ -25,6 +25,8 @@ is_essential = True
managed_packages = ['unattended-upgrades', 'needrestart']
managed_services = ['freedombox-dist-upgrade']
first_boot_steps = [
{
'id': 'backports_wizard',
@@ -176,11 +178,7 @@ def setup_repositories(data):
actions.superuser_run('upgrades', command)
if is_dist_upgrade_enabled():
command = ['dist-upgrade']
if cfg.develop:
command.append('--develop')
actions.superuser_run('upgrades', command)
actions.superuser_run('upgrades', ['start-dist-upgrade'])
def is_backports_requested():
@@ -0,0 +1,9 @@
[Unit]
Description=Upgrade to new stable Debian release
[Service]
Type=simple
ExecStart=/usr/share/plinth/actions/upgrades dist-upgrade
KillMode=none
TimeoutStopSec=3600
Restart=no