From b4838eeb6b0f5dcbfc293e1062fc0d6a0eaa8a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Mar 2023 08:52:10 +0100 Subject: [PATCH] fix --- doc/ADMIN.md | 2 -- doc/POST_INSTALL.md | 5 +---- doc/POST_UPGRADE.md | 2 +- scripts/install | 5 +++-- scripts/upgrade | 3 ++- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 4a2f596..697dfd8 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,5 +1,3 @@ -## Configuration - We have added the mandatory sandbox domain for you but you still need to configure your DNS and generate Let's Encrypt Certificates for it !! Once CryptPad is installed, create an account via the Register button on the home page. To make this account an instance administrator: diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 10af913..56dc794 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,7 +1,7 @@ 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 +Then you can please open your __APP__ domain: https://__DOMAIN__ Once CryptPad is installed, create an account via the Sign Up button on the home page which will take you to the Register page. To make this account an instance administrator: @@ -11,6 +11,3 @@ To make this account an instance administrator: adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], - - -If you are facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/cryptpad_ynh" diff --git a/doc/POST_UPGRADE.md b/doc/POST_UPGRADE.md index fe8169e..81d8663 100644 --- a/doc/POST_UPGRADE.md +++ b/doc/POST_UPGRADE.md @@ -1,6 +1,6 @@ message="CryptPad was successfully upgraded :) We have added a sandbox domain for you but you still need to configure your DNS and generate Let's Encrypt Certificates for it !! -If not already done, then you can please open your $app domain: https://__DOMAIN____PATH____ +If not already done, then you can please open your $app domain: https://__DOMAIN__ Create an account via the Register button on the home page. To make this account an instance administrator: 1. Copy the public key found in User Menu (avatar at the top right) > Settings > Account > Public Signing Key 2. Paste this key in /var/www/cryptpad/config/config.js in the following array (uncomment and replace the placeholder): diff --git a/scripts/install b/scripts/install index 4fd6831..5be5342 100644 --- a/scripts/install +++ b/scripts/install @@ -32,6 +32,8 @@ if [[ $domain == *".local" ]]; then sandboxdomain=sandbox-$domain fi +ynh_app_setting_set --app=$app --key=sandboxdomain --value=$sandboxdomain + ynh_script_progression --message="Setting up sandobx domain : $sandboxdomain" --weight=1 # We don't test that in CI @@ -43,7 +45,7 @@ fi #================================================= # INSTALL DEPENDENCIES #================================================= -#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=20 +ynh_script_progression --message="Installing dependencies..." --weight=20 ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version @@ -107,7 +109,6 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # SETUP SSOWAT #================================================= -#ynh_script_progression --message="Configuring permissions..." --weight=1 # We authorize access to sandbox domain # We don't test that in CI diff --git a/scripts/upgrade b/scripts/upgrade index 704f23c..ad159ce 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,7 +40,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config/config.js" + ynh_setup_source --dest_dir="$install_dir" #--keep="config/config.js" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -117,6 +117,7 @@ popd #================================================= # ADD UPGRADED CONFIG WITH SANDBOX #================================================= +ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_add_config --template="../conf/config.js" --destination="$install_dir/config/config.js"