From 9ee228db0031f93e364f7d1ba81685725b1e9e14 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 8 May 2021 11:23:20 +0200 Subject: [PATCH] Fix --- README.md | 6 +++--- README_fr.md | 4 ++-- manifest.json | 2 +- scripts/install | 3 ++- scripts/upgrade | 17 ++--------------- 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index b9451ad..2d80262 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ CodiMD is a real-time collaborative word processing web service. It uses Markdow ## Demo -* [Official demo](https://demo.codimd.org/) +* [Official demo]() ## Configuration @@ -39,8 +39,8 @@ You can configure CodiMD by editing this file `/var/www/codimd/config.json` usin #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/codimd%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/codimd/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/codimd%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/codimd/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/codimd.svg)](https://ci-apps.yunohost.org/ci/apps/codimd/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/codimd.svg)](https://ci-apps-arm.yunohost.org/ci/apps/codimd/) ## Links diff --git a/README_fr.md b/README_fr.md index b3fc550..ec4a163 100644 --- a/README_fr.md +++ b/README_fr.md @@ -8,7 +8,7 @@ *[Read this readme in english.](./README.md)* > *Ce package vous permet d'installer CodiMD rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) pour apprendre comment l'installer.* ## Vue d'ensemble CodiMD est un service web de traitement de texte collaboratif en temps réel. Il utilise le langage Markdown. @@ -21,7 +21,7 @@ CodiMD est un service web de traitement de texte collaboratif en temps réel. Il ## Démo -* [Démo officielle](https://demo.codimd.org/) +* [Démo officielle]() ## Configuration diff --git a/manifest.json b/manifest.json index 6b69d8d..50c0d71 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "url": "https://github.com/hackmdio/codimd", "license": "AGPL-3.0-only", "maintainer": { - "name": "liberodark" + "name": "" }, "requirements": { "yunohost": ">= 4.1.7" diff --git a/scripts/install b/scripts/install index 50464b3..5c35756 100644 --- a/scripts/install +++ b/scripts/install @@ -86,9 +86,10 @@ ynh_system_user_create --username=$app --home_dir=$final_path ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run -ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +ynh_psql_setup_db --db_user=$db_name --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE diff --git a/scripts/upgrade b/scripts/upgrade index 7fbd84c..fdbb473 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -145,21 +145,8 @@ fi #================================================= ynh_script_progression --message="Modifying a config file..." --weight=2 -ynh_backup_if_checksum_is_different --file="$final_path/config.json" - -cp ../conf/config.json.example "$final_path/config.json" - -# Main config File -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json" - -# Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum --file="$final_path/config.json" +path=${path_url:1} +ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json" #================================================= # SETUP SYSTEMD