mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
radicale: Simplify upgrading to newer packages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
920d083301
commit
a821517e91
@ -99,20 +99,6 @@ def subcommand_migrate(_):
|
|||||||
|
|
||||||
action_utils.webserver_disable('radicale-plinth')
|
action_utils.webserver_disable('radicale-plinth')
|
||||||
|
|
||||||
aug = load_augeas()
|
|
||||||
|
|
||||||
# Revert the config to package's original.
|
|
||||||
aug.remove('/files' + DEFAULT_FILE + '/ENABLE_RADICALE')
|
|
||||||
aug.remove('/files' + CONFIG_FILE + '/server/hosts')
|
|
||||||
aug.remove('/files' + CONFIG_FILE + '/server/base_prefix')
|
|
||||||
aug.remove('/files' + CONFIG_FILE + '/well-known/caldav')
|
|
||||||
aug.remove('/files' + CONFIG_FILE + '/well-known/carddav')
|
|
||||||
aug.remove('/files' + CONFIG_FILE + '/auth/type')
|
|
||||||
if current_version and current_version < radicale.VERSION_2:
|
|
||||||
aug.remove('/files' + CONFIG_FILE + '/rights/type')
|
|
||||||
|
|
||||||
aug.save()
|
|
||||||
|
|
||||||
|
|
||||||
def subcommand_configure(arguments):
|
def subcommand_configure(arguments):
|
||||||
"""Sets the radicale rights type to a particular value"""
|
"""Sets the radicale rights type to a particular value"""
|
||||||
|
|||||||
@ -97,7 +97,7 @@ def setup(helper, old_version=None):
|
|||||||
|
|
||||||
# Try to upgrade radicale 1.x to 2.x.
|
# Try to upgrade radicale 1.x to 2.x.
|
||||||
helper.call('pre', actions.superuser_run, 'radicale', ['migrate'])
|
helper.call('pre', actions.superuser_run, 'radicale', ['migrate'])
|
||||||
helper.install(managed_packages)
|
helper.install(managed_packages, force_configuration='new')
|
||||||
|
|
||||||
# Check that radicale 2.x is installed.
|
# Check that radicale 2.x is installed.
|
||||||
current_version = get_package_version()
|
current_version = get_package_version()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user