From 5faba7307f29ea88dda11210b9c7299759f0bc59 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 9 Apr 2022 09:48:58 +0200 Subject: [PATCH 1/3] fix --- conf/nginx.conf | 5 ----- conf/systemd.service | 2 +- manifest.json | 4 ++-- scripts/change_url | 4 ++-- scripts/install | 3 +-- scripts/restore | 5 +---- scripts/upgrade | 13 +++++++++++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index c1846d3..b4e82f8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,5 @@ location ^~ / { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_pass http://127.0.0.1:__PORT__/; proxy_redirect off; proxy_set_header Host $host; diff --git a/conf/systemd.service b/conf/systemd.service index 0f4b534..181c898 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Ethercalc: collaborative spreadsheet editor. +Description=Ethercalc: collaborative spreadsheet editor After=network.target [Service] diff --git a/manifest.json b/manifest.json index ff01d61..e44091f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Real-time collaborative spreadsheet editor", "fr": "Feuille de calcul collaborative en ligne" }, - "version": "20201228~ynh4", + "version": "20201228~ynh5", "url": "https://ethercalc.net/", "upstream": { "license": "CPAL-1.0", @@ -22,7 +22,7 @@ }, "multi_instance": true, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "services": [ "nginx" diff --git a/scripts/change_url b/scripts/change_url index 8273e43..a7a8996 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -70,7 +70,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -108,7 +108,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index e21720b..91caed6 100644 --- a/scripts/install +++ b/scripts/install @@ -113,8 +113,7 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" - +env_path="$PATH" ynh_add_systemd_config #================================================= diff --git a/scripts/restore b/scripts/restore index 63e6ce5..c076203 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,9 +29,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -99,7 +96,7 @@ yunohost service add $app --description "Collaborative spreadsheet editor" --log #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 94a3fa6..83a2cfa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,7 +66,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # CREATE DEDICATED USER @@ -120,6 +120,15 @@ pushd "$final_path" ynh_exec_warn_less npm i zappajs popd +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 + +env_path="$PATH" +# Create a dedicated systemd config +ynh_add_systemd_config + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -132,7 +141,7 @@ yunohost service add $app --description "Collaborative spreadsheet editor" --log #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=5 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # RELOAD NGINX From 7208ead810d67d5cf77fc8ced812f7c5e5f83747 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 9 Apr 2022 07:49:02 +0000 Subject: [PATCH 2/3] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 017cd70..cf39717 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in EtherCalc is a collaborative spreadsheet that can be edited in real time. Each spreadsheet has its own URL. It has the basic functionalities: formatting, mathematical functions, graphics, adding comments, version history, export in HTML or in CSV. EtherCalc is a decentralized software: different instances allow the use of the service, they are made available by several organizations (for example the eponymous site or the FramaCalc service). This makes it possible to avoid concentrating all the data in the hands of the same actor. Instances can be personalized (limitation of the duration of hosting of the spreadsheet, modification of the design, etc.). -**Shipped version:** 20201228~ynh4 +**Shipped version:** 20201228~ynh5 **Demo:** https://ethercalc.net/ diff --git a/README_fr.md b/README_fr.md index de74eed..0d08331 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour EtherCalc est un tableur collaboratif éditable en temps réel. Chaque tableur possède sa propre URL. Il dispose des fonctionnalités de base : mise en forme, fonctions mathématiques, graphiques, ajout de commentaires, historique des versions, export en HTML ou en CSV. EtherCalc est un logiciel décentralisé : différentes instances permettent d'utiliser le service, elles sont mises à disposition par plusieurs organisations (par exemple le site éponyme ou le service FramaCalc). Cela permet d'éviter de concentrer toutes les données entre les mains d'un même acteur. Les instances peuvent être personnalisées (limitation de la durée d'hébergement du tableur, modification du design, etc.). -**Version incluse :** 20201228~ynh4 +**Version incluse :** 20201228~ynh5 **Démo :** https://ethercalc.net/ From 65f1cca52d8fd8ce12ee05e289fe17fc4d25b719 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 9 Apr 2022 14:17:32 +0200 Subject: [PATCH 3/3] Update upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 83a2cfa..1c563dd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) +expire=$(ynh_app_setting_get --app=$app --key=expire) #================================================= # CHECK VERSION