mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
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:
1 parent
66b0238146
commit
8934c22ef3
3 files changed
+38
-24
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user