mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
nextcloud: Fix existing installs to upgrade properly
Fixes: #2433. Tests: - Without the patches, as described in the bug, create an installation that is facing the problem. Ensure that 'podman exec --user www-data nextcloud-freedombox /var/www/html/occ config:system:get overwrite.cli.url' shows an empty value. - Apply patches, nextcloud app is updated and configuration value is set to 'http://localhost/nextlcoud' by running 'podman exec --user www-data nextcloud-freedombox /var/www/html/occ config:system:get overwrite.cli.url'. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
afb69c28d1
commit
2a30d64f08
@ -46,7 +46,7 @@ class NextcloudApp(app_module.App):
|
|||||||
|
|
||||||
app_id = 'nextcloud'
|
app_id = 'nextcloud'
|
||||||
|
|
||||||
_version = 1
|
_version = 2
|
||||||
|
|
||||||
configure_when_disabled = False
|
configure_when_disabled = False
|
||||||
|
|
||||||
@ -128,6 +128,13 @@ class NextcloudApp(app_module.App):
|
|||||||
|
|
||||||
def setup(self, old_version):
|
def setup(self, old_version):
|
||||||
"""Install and configure the app."""
|
"""Install and configure the app."""
|
||||||
|
if old_version == 1:
|
||||||
|
with _ensure_nextcloud_running():
|
||||||
|
# Reset the value so that 'overwrite.cli.url' is set to default
|
||||||
|
# value instead of it being missing.
|
||||||
|
if not privileged.get_override_domain():
|
||||||
|
privileged.set_override_domain('')
|
||||||
|
|
||||||
super().setup(old_version)
|
super().setup(old_version)
|
||||||
# Drop-in configs need to be enabled for setup to succeed
|
# Drop-in configs need to be enabled for setup to succeed
|
||||||
self.get_component('dropin-configs-nextcloud').enable()
|
self.get_component('dropin-configs-nextcloud').enable()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user