mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +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):
|
def set_override_domain(domain_name: str):
|
||||||
"""Set the domain name that Nextcloud will use to override all domains."""
|
"""Set the domain name that Nextcloud will use to override all domains."""
|
||||||
protocol = 'https'
|
protocol = 'https'
|
||||||
if domain_name.endswith('.onion'):
|
if domain_name.endswith('.onion') or not domain_name:
|
||||||
protocol = 'http'
|
protocol = 'http'
|
||||||
|
|
||||||
if domain_name:
|
if domain_name:
|
||||||
@ -130,7 +130,8 @@ def set_override_domain(domain_name: str):
|
|||||||
else:
|
else:
|
||||||
_run_occ('config:system:delete', 'overwritehost')
|
_run_occ('config:system:delete', 'overwritehost')
|
||||||
_run_occ('config:system:delete', 'overwriteprotocol')
|
_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
|
# Restart to apply changes immediately
|
||||||
action_utils.service_restart('nextcloud-freedombox')
|
action_utils.service_restart('nextcloud-freedombox')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user