mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
mumble: Implement force upgrade for 1.3.*
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
dd6a03442e
commit
863b3cdfe0
@ -16,6 +16,7 @@ from plinth.modules import names
|
|||||||
from plinth.modules.firewall.components import Firewall
|
from plinth.modules.firewall.components import Firewall
|
||||||
from plinth.modules.letsencrypt.components import LetsEncrypt
|
from plinth.modules.letsencrypt.components import LetsEncrypt
|
||||||
from plinth.modules.users.components import UsersAndGroups
|
from plinth.modules.users.components import UsersAndGroups
|
||||||
|
from plinth.utils import Version
|
||||||
|
|
||||||
from .manifest import backup, clients # noqa, pylint: disable=unused-import
|
from .manifest import backup, clients # noqa, pylint: disable=unused-import
|
||||||
|
|
||||||
@ -98,6 +99,21 @@ def setup(helper, old_version=None):
|
|||||||
app.get_component('letsencrypt-mumble').setup_certificates()
|
app.get_component('letsencrypt-mumble').setup_certificates()
|
||||||
|
|
||||||
|
|
||||||
|
def force_upgrade(helper, packages):
|
||||||
|
"""Force upgrade mumble-server to resolve conffile prompts."""
|
||||||
|
if 'mumble-server' not in packages:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Allow upgrades within 1.3.*
|
||||||
|
package = packages['mumble-server']
|
||||||
|
if Version(package['new_version']) > Version('1.4~'):
|
||||||
|
return False
|
||||||
|
|
||||||
|
helper.install(['mumble-server'], force_configuration='new')
|
||||||
|
helper.call('post', actions.superuser_run, 'mumble', ['setup'])
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def get_available_domains():
|
def get_available_domains():
|
||||||
"""Return an iterator with all domains able to have a certificate."""
|
"""Return an iterator with all domains able to have a certificate."""
|
||||||
return (domain.name for domain in names.components.DomainName.list()
|
return (domain.name for domain in names.components.DomainName.list()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user