From 5a228a8b294e51ccae0645f82b40b057ff7edfc5 Mon Sep 17 00:00:00 2001 From: jarod5001 <68397534+jarod5001@users.noreply.github.com> Date: Sun, 8 May 2022 20:49:46 +0200 Subject: [PATCH 1/2] Update upgrade --- scripts/upgrade | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f52658e..8b37948 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,12 +16,13 @@ ynh_script_progression --message="Loading installation settings..." --time --wei app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -language=$(ynh_app_setting_get --app=$app --key=language) -admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) +domain=$(ynh_app_setting_get --app=$app --key=domain) +is_public=$(ynh_app_setting_get --app=$app --key=is_public) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +password=$(ynh_app_setting_get --app=$app --key=password) +admin=$(ynh_app_setting_get --app=$app --key=admin) +language=$(ynh_app_setting_get --app=$app --key=language) #================================================= # CHECK VERSION @@ -54,9 +55,9 @@ ynh_abort_if_errors #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 +# ynh_script_progression --message="Stopping a systemd service..." --time --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="/var/log/$app/$app.log" #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -170,13 +171,13 @@ ynh_script_progression --message="Updating a configuration file..." --time --wei ### The file will automatically be backed-up if it's found to be manually modified (because ### ynh_add_config keeps track of the file's checksum) -ynh_add_config --template="some_config_file" --destination="$final_path/some_config_file" +ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" # FIXME: this should be handled by the core in the future # You may need to use chmod 600 instead of 400, # for example if the app is expected to be able to modify its own config -chmod 400 "$final_path/some_config_file" -chown $app:$app "$final_path/some_config_file" +chmod 600 "$final_path/config.php" +chown $app:$app "$final_path/config.php" ### For more complex cases where you want to replace stuff using regexes, ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed) @@ -188,10 +189,10 @@ chown $app:$app "$final_path/some_config_file" #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 +# ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config +# ynh_add_systemd_config #================================================= # GENERIC FINALIZATION @@ -206,24 +207,24 @@ ynh_use_logrotate --non-append #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 +# ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" +# yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 +# ynh_script_progression --message="Starting a systemd service..." --time --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="/var/log/$app/$app.log" #================================================= # UPGRADE FAIL2BAN #================================================= -ynh_script_progression --message="Reconfiguring Fail2Ban..." --time --weight=1 +# ynh_script_progression --message="Reconfiguring Fail2Ban..." --time --weight=1 # Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" +# ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" #================================================= # RELOAD NGINX From 90d0be749f317e5a17d508f3de726ad270ed4ca2 Mon Sep 17 00:00:00 2001 From: jarod5001 <68397534+jarod5001@users.noreply.github.com> Date: Sun, 8 May 2022 20:57:44 +0200 Subject: [PATCH 2/2] Update manifest.json --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index f429514..ccc2c02 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "tinyfilemanager", "packaging_format": 1, "description": { - "en": "Explain in *a few (10~15) words* the purpose of the app or what it actually does (it is meant to give a rough idea to users browsing a catalog of 100+ apps)", - "fr": "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)" + "en": "Web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, uploading, editing and managing files and folders online via web browser.", + "fr": "Gestionnaire de fichiers basé sur le Web et c'est un gestionnaire de fichiers simple, rapide et petit avec un seul fichier, une application Web multilingue pour stocker, télécharger, éditer et gérer des fichiers et des dossiers en ligne via un navigateur Web" }, "version": "2.4.7~ynh1", "url": "https://tinyfilemanager.github.io/",