From 160fc38886f27cf9ffcea11cdb0d74863cb15839 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 19:58:29 +0100 Subject: [PATCH 1/3] protect final_path --- scripts/install | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 3629704..a049c8c 100644 --- a/scripts/install +++ b/scripts/install @@ -140,6 +140,7 @@ ynh_store_file_checksum --file="$final_path/credentials.json" # Set permissions to app files chown -R $app: $final_path +chmod o-rwx $final_path chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/restore b/scripts/restore index 4535ce5..970dd1e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,6 +92,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name # Restore permissions on app files chown -R $app: $final_path +chmod o-rwx $final_path chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4105b1a..0fb973a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,6 +156,7 @@ popd || ynh_die # Set permissions on app files chown -R $app: $final_path +chmod o-rwx $final_path chmod 600 $final_path/credentials.json #================================================= From 84df8c4f14bce5092b5c2a113576c9c759f478d2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 21:37:10 +0100 Subject: [PATCH 2/3] Fix --- scripts/_common.sh | 2 +- scripts/install | 2 -- scripts/upgrade | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d4ee246..2eab5a8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="postgresql postgresql-contrib apt-transport-https" +pkg_dependencies="postgresql postgresql-contrib" nodejs_version=14 diff --git a/scripts/install b/scripts/install index a049c8c..c88762f 100644 --- a/scripts/install +++ b/scripts/install @@ -127,10 +127,8 @@ popd || ynh_die ynh_script_progression --message="Configuring Etherpad..." --weight=60 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -ynh_store_file_checksum --file="$final_path/settings.json" ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" -ynh_store_file_checksum --file="$final_path/credentials.json" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 0fb973a..ee6b278 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,13 +126,9 @@ ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 -ynh_backup_if_checksum_is_different --file="$final_path/settings.json" ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -ynh_store_file_checksum --file="$final_path/settings.json" -ynh_backup_if_checksum_is_different --file="$final_path/credentials.json" ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" -ynh_store_file_checksum --file="$final_path/credentials.json" #================================================= # INSTALL ETHERPAD From 17bab311756a0ef6042d69fac045e10924324efe Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 21:49:50 +0100 Subject: [PATCH 3/3] Fix --- README.md | 2 +- README_fr.md | 2 +- check_process | 1 - scripts/install | 1 - scripts/upgrade | 1 - 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2feca79..0e2ab32 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation * Official documentation: http://etherpad.org/doc/v1.8.13 - * YunoHost documentation: https://yunohost.org/#/app_etherpad + * YunoHost documentation: https://yunohost.org/en/app_etherpad ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 366bcce..f583c69 100644 --- a/README_fr.md +++ b/README_fr.md @@ -33,7 +33,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain ## Documentation * Documentation officielle : http://etherpad.org/doc/v1.8.13 - * Documentation YunoHost : https://yunohost.org/#/app_etherpad + * Documentation YunoHost : https://yunohost.org/fr/app_etherpad ## Fonctionnalités spécifiques à YunoHost diff --git a/check_process b/check_process index 89a85f6..4c14d9c 100644 --- a/check_process +++ b/check_process @@ -23,7 +23,6 @@ upgrade=1 from_commit=96653aee9379d579a655777ac274355f4afca61c backup_restore=1 multi_instance=1 - port_already_use=0 change_url=1 ;;; Options Email= diff --git a/scripts/install b/scripts/install index c88762f..04230bf 100644 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,6 @@ popd || ynh_die ynh_script_progression --message="Configuring Etherpad..." --weight=60 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" - ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ee6b278..11a1c37 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -127,7 +127,6 @@ ynh_install_nodejs --nodejs_version=$nodejs_version ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" - ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" #=================================================