mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
upgrades: Restart FreedomBox service at end of dist-upgrade
This was removed in an earlier change, so restore it. Avoids a transient "IndexError: list index out of range" error caused by django when visiting a page. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
2ae60802a9
commit
8a3603cd5f
@ -12,7 +12,8 @@ import subprocess
|
||||
import sys
|
||||
|
||||
from plinth.action_utils import (apt_hold, debconf_set_selections,
|
||||
run_apt_command, service_daemon_reload)
|
||||
run_apt_command, service_daemon_reload,
|
||||
service_restart)
|
||||
from plinth.modules.apache.components import check_url
|
||||
from plinth.modules.upgrades import (BACKPORTS_SOURCES_LIST, SOURCES_LIST,
|
||||
get_current_release, is_backports_current)
|
||||
@ -440,6 +441,11 @@ def _perform_dist_upgrade():
|
||||
print('Running unattended-upgrade...', flush=True)
|
||||
subprocess.run(['unattended-upgrade', '--verbose'])
|
||||
|
||||
# Restart FreedomBox service to ensure it is using the latest
|
||||
# dependencies.
|
||||
print('Restarting FreedomBox service...', flush=True)
|
||||
service_restart('plinth')
|
||||
|
||||
# Update apt cache again to trigger force_upgrades.
|
||||
print('Updating Apt cache...', flush=True)
|
||||
run_apt_command(['update'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user