From 9c307c82b9a0903607c24fb6b8f8668546459d09 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 8 Feb 2021 11:02:40 +0100 Subject: [PATCH] Fix --- README.md | 1 + README_fr.md | 7 ++++--- conf/nginx.conf | 2 +- manifest.json | 2 +- scripts/backup | 4 ++-- scripts/change_url | 2 +- scripts/install | 2 +- scripts/remove | 4 ++-- scripts/restore | 8 ++++---- scripts/upgrade | 12 ++++++------ 10 files changed, 23 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index a136ca4..9c00531 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ No users support. * Report a bug: https://github.com/YunoHost-Apps/keeweb_ynh/issues * Keeweb website: https://keeweb.info/ + * Upstream app repository: https://github.com/keeweb/keeweb * YunoHost website: https://yunohost.org/ --- diff --git a/README_fr.md b/README_fr.md index 169130a..c12c9d6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -57,9 +57,10 @@ Pas de support utilisateurs ## Liens - * Reporter un bug: https://github.com/YunoHost-Apps/keeweb_ynh/issues - * Site de Keeweb: https://keeweb.info/ - * Site de YunoHost: https://yunohost.org/ + * Reporter un bug : https://github.com/YunoHost-Apps/keeweb_ynh/issues + * Site de Keeweb : https://keeweb.info/ + * Dépôt de l'application principale : https://github.com/keeweb/keeweb + * Site de YunoHost : https://yunohost.org/ --- diff --git a/conf/nginx.conf b/conf/nginx.conf index b7dc034..817f4e3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,7 +6,7 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } index index.html ; -# default_type text/html; + # default_type text/html; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/manifest.json b/manifest.json index 6c49aa6..4702fbd 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "pierre@kayou.io" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.0.0" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index 478d80f..149cafd 100644 --- a/scripts/backup +++ b/scripts/backup @@ -23,8 +23,8 @@ ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get $app final_path) -domain=$(ynh_app_setting_get $app domain) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP diff --git a/scripts/change_url b/scripts/change_url index 6dfbb14..be8c257 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,7 +25,7 @@ app=$YNH_APP_INSTANCE_NAME # LOAD SETTINGS #================================================= -final_path=$(ynh_app_setting_get $app final_path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # CHECK THE SYNTAX OF THE PATHS diff --git a/scripts/install b/scripts/install index b8162ba..5160f96 100644 --- a/scripts/install +++ b/scripts/install @@ -75,7 +75,7 @@ ynh_add_nginx_config # USE THE CONFIG FILE #================================================= -ynh_replace_string "(no-config)" "config.json" "$final_path/index.html" +ynh_replace_string --match_string="(no-config)" --replace_string="config.json" --target_file="$final_path/index.html" #================================================= # COPY THE CONFIG FILE diff --git a/scripts/remove b/scripts/remove index 0f9791a..41df3f7 100644 --- a/scripts/remove +++ b/scripts/remove @@ -16,8 +16,8 @@ ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get $app domain) -final_path=$(ynh_app_setting_get $app final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # STANDARD REMOVE diff --git a/scripts/restore b/scripts/restore index 02d0f6c..c8727fc 100644 --- a/scripts/restore +++ b/scripts/restore @@ -22,9 +22,9 @@ ynh_abort_if_errors app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get $app domain) -path_url=$(ynh_app_setting_get $app path) -final_path=$(ynh_app_setting_get $app final_path) +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) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -67,7 +67,7 @@ chown -R root: $final_path #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index e135d5d..2afd0f2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,10 +15,10 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get $app domain) -path_url=$(ynh_app_setting_get $app path) -is_public=$(ynh_app_setting_get $app is_public) -final_path=$(ynh_app_setting_get $app final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +path_url=$(ynh_app_setting_get --app=$app --key=path) +is_public=$(ynh_app_setting_get --app=$app --key=is_public) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # CHECK VERSION @@ -90,7 +90,7 @@ ynh_add_nginx_config # USE THE CONFIG FILE #================================================= -ynh_replace_string "(no-config)" "config.json" "$final_path/index.html" +ynh_replace_string --match_string="(no-config)" --replace_string="config.json" --target_file="$final_path/index.html" #================================================= # COPY THE CONFIG FILE @@ -98,7 +98,7 @@ ynh_replace_string "(no-config)" "config.json" "$final_path/index.html" # Copie ou modification d'un fichier de config ynh_backup_if_checksum_is_different "$final_path/config.json" # Créé un backup du fichier de config si il a été modifié. -cp ../conf/config.json "$final_path/" +cp ../conf/config.json "$final_path/config.json" ynh_store_file_checksum "$final_path/config.json" # Réenregistre la somme de contrôle du fichier de config #=================================================