mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
nextcloud: Fix issue with upgrading to next version
Don't delete overwrite.cli.url when the Nextcloud app's settings are updated with no domain configured. Instead, set it to the default value of http://localhost/nextcloud We might want to consider updating existing, faulty setups. Helps: #2433 Signed-off-by: Benedek Nagy <contact@nbenedek.me> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
7e7ad62c8b
commit
1dabc220b4
@ -119,7 +119,7 @@ def get_override_domain():
|
||||
def set_override_domain(domain_name: str):
|
||||
"""Set the domain name that Nextcloud will use to override all domains."""
|
||||
protocol = 'https'
|
||||
if domain_name.endswith('.onion'):
|
||||
if domain_name.endswith('.onion') or not domain_name:
|
||||
protocol = 'http'
|
||||
|
||||
if domain_name:
|
||||
@ -130,7 +130,8 @@ def set_override_domain(domain_name: str):
|
||||
else:
|
||||
_run_occ('config:system:delete', 'overwritehost')
|
||||
_run_occ('config:system:delete', 'overwriteprotocol')
|
||||
_run_occ('config:system:delete', 'overwrite.cli.url')
|
||||
_run_occ('config:system:set', 'overwrite.cli.url', '--value',
|
||||
f'{protocol}://localhost/nextcloud')
|
||||
|
||||
# Restart to apply changes immediately
|
||||
action_utils.service_restart('nextcloud-freedombox')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user