From 764a57a115da4541bad65899fecc4e3698f2a704 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Tue, 14 Nov 2023 10:54:00 +0100 Subject: [PATCH 1/2] api. default value for tls_verify_collabora --- imageroot/actions/get-configuration/20read | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/imageroot/actions/get-configuration/20read b/imageroot/actions/get-configuration/20read index 7748026..5352454 100755 --- a/imageroot/actions/get-configuration/20read +++ b/imageroot/actions/get-configuration/20read @@ -70,6 +70,10 @@ for c in rdb.scan_iter('module/collabora*/environment'): if url: array_collabora.append({"name": name, "label": name+' ('+ url+')', "value": url}) config["array_collabora"] = array_collabora +# The first load of nextcloud json is empty of tls_verify_collabora +# let's do a default value +if "tls_verify_collabora" not in config: + config["tls_verify_collabora"] = False # Dump the configuratio to stdou json.dump(config, fp=sys.stdout) From 7eef9c75dc44f6dc2b19953de8a0c55244d128f0 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Tue, 14 Nov 2023 10:54:52 +0100 Subject: [PATCH 2/2] api.fix the collabora hostname and certificate validation --- imageroot/actions/configure-module/80configure_collabora | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/imageroot/actions/configure-module/80configure_collabora b/imageroot/actions/configure-module/80configure_collabora index f3eba17..2de48e9 100755 --- a/imageroot/actions/configure-module/80configure_collabora +++ b/imageroot/actions/configure-module/80configure_collabora @@ -10,11 +10,11 @@ tls_verify=$(cat config.json | jq -r '.tls_verify_collabora // empty') if [[ "$collabora_host" != "" ]]; then occ app:install richdocuments - occ config:app:set richdocuments wopi_url --value=https://$COLLABORA_HOST - if [[ "$tls_verify" == 'True' ]]; then - occ config:app:set richdocuments disable_certificate_verification --value=yes - else + occ config:app:set richdocuments wopi_url --value=https://$collabora_host + if [[ "$tls_verify" == 'true' ]]; then occ config:app:set richdocuments disable_certificate_verification --value=no + else + occ config:app:set richdocuments disable_certificate_verification --value=yes fi occ app:enable richdocuments fi