From a0eabe2d53ecc5d786ccae1e1a93e6c7390cdd74 Mon Sep 17 00:00:00 2001 From: DDATAA <45762540+Ddataa@users.noreply.github.com> Date: Fri, 10 Feb 2023 10:56:14 +0000 Subject: [PATCH 1/4] Update app.src --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 65512e9..2ab7c07 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/5.2.1.tar.gz -SOURCE_SUM=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 +SOURCE_SUM=945abe5bae0da25a4e2ef8e02730aaa5bb5e5a0b8bfd7a23a09ec38422d7c47f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From 472a01ec0057d7c654368b629dd67edceeff6be3 Mon Sep 17 00:00:00 2001 From: DDATAA <45762540+Ddataa@users.noreply.github.com> Date: Fri, 10 Feb 2023 11:13:59 +0000 Subject: [PATCH 2/4] Update upgrade --- scripts/upgrade | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5aa6ad9..2d0e277 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,7 +105,21 @@ chgrp -R www-data $final_path #================================================= # CREATE A SANDBOX DOMAIN #================================================= -sandboxdomain=sandbox-$domain +# if the main domain for the app is a root domain, we create a correct sandbox subdomain +if [[ $domain == *"."* ]]; then + sandboxdomain=sandbox.$domain +fi +# if the main domain for the app is already a sub-domain, we create a correct sandbox domain +if [[ $domain == *"."*"."* ]]; then + sandboxdomain=sandbox-$domain +fi +# if the main domain for the app is a .local root domain, we create a correct sandbox subdomain +if [[ $domain == *".local" ]]; then + sandboxdomain=sandbox-$domain +fi + +ynh_script_progression --message="Setting up sandobx domain : $sandboxdomain" --weight=1 + # We don't test that in CI if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then yunohost domain add $sandboxdomain @@ -182,12 +196,6 @@ fi # We don't test that in CI if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then ynh_permission_url --permission="main" --add_url=$sandboxdomain --auth_header=true - # there is a bug in core that add a slash at the end of domain in ssowat conf for uris var - # so we use ${sandboxdomain%/} to remove the eccessive trailing slash # it doesnt work - # we use jq to correct /etc/ssowat/conf.json - uri2=$sandboxdomain - touch /etc/ssowat/conf.json.persistent - cat /etc/ssowat/conf.json | jq --arg uri2 "$uri2" '(.permissions[] | select(.label=="CryptPad") | .uris[1]) |=$uri2' >> /etc/ssowat/conf.json.persistent fi #================================================= From 11dce9b909d484755192166c5c14bb67b56e37c7 Mon Sep 17 00:00:00 2001 From: DDATAA <45762540+Ddataa@users.noreply.github.com> Date: Fri, 10 Feb 2023 14:36:15 +0000 Subject: [PATCH 3/4] Update config.js --- conf/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.js b/conf/config.js index 41b1075..5488347 100644 --- a/conf/config.js +++ b/conf/config.js @@ -324,5 +324,5 @@ module.exports = { * such as Docker. * */ - installMethod: 'unspecified', + installMethod: 'yunohost', }; From 9579f2749bd616345bb052b08b56208ccf660828 Mon Sep 17 00:00:00 2001 From: DDATAA <45762540+Ddataa@users.noreply.github.com> Date: Fri, 10 Feb 2023 14:46:42 +0000 Subject: [PATCH 4/4] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 51dd891..f3fcddf 100644 --- a/scripts/install +++ b/scripts/install @@ -228,7 +228,8 @@ message="CryptPad was successfully installed :) READ CAREFULLY !! -We have added a sandbox domain : $sandboxdomain for you but you still need to configure your DNS and generate Let's Encrypt Certificates for it. +We have added a sandbox domain : $sandboxdomain for you but you still need to configure your DNS and generate the Let's Encrypt Certificates for it. +You will need also to restart CryptPad service after this is done. Then you can please open your $app domain: https://$domain$path_url Once CryptPad is installed, create an account via the Sign Up button on the home page which will take you to the Register page.