From 7009e08730adc195a4efb7347900074c9e506e31 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Wed, 25 Sep 2019 21:04:44 +0200 Subject: [PATCH] fix linter and upgrade --- manifest.json | 9 ++++++--- scripts/backup | 8 ++------ scripts/install | 7 +++---- scripts/restore | 9 +++------ scripts/upgrade | 10 +++++++--- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/manifest.json b/manifest.json index 8028e9e..48b8016 100644 --- a/manifest.json +++ b/manifest.json @@ -4,9 +4,9 @@ "packaging_format": 1, "url": "https://www.galette.eu", "license": "GPL-3.0-or-later", - "version": "0.9.1.2~ynh1", + "version": "0.9.1.2~ynh2", "requirements": { - "yunohost": ">= 2.7.9" + "yunohost": ">= 3.6" }, "services": [ "nginx", @@ -44,7 +44,10 @@ { "name": "is_public", "ask": { - "en": "Is it a public application ?" + "en": "Is it a public application?" + }, + "help": { + "en": "If no, only connected YunoHost users will be able to interact with the app" }, "type": "boolean", "default": "0" diff --git a/scripts/backup b/scripts/backup index aa59f65..f6f41c2 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,12 +6,8 @@ # IMPORT GENERIC HELPERS #================================================= -if [ ! -e _common.sh ]; then - # Get the _common.sh file if it's not in the current directory - cp ../settings/scripts/_common.sh ./_common.sh - chmod a+rx _common.sh -fi -source _common.sh +#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/install b/scripts/install index a79637b..878c190 100755 --- a/scripts/install +++ b/scripts/install @@ -150,7 +150,7 @@ systemctl reload nginx message="Galette need you to finish the installation manually. -Please open "https://$domain$path_url" +Please open "$domain/$path_url" and finish the install process. Database information you'll need: Type: mysql @@ -160,10 +160,9 @@ User: "$db_name" Password: "$db_pwd" Name: "$db_name" -Important: after the installation, you _should_ run: - +Important! Once done, please remember to run as root or with sudo: \`chmod -R 500 "$final_path/config"\` -\`rm -rf "$final_path/install"\` +\`rm -fr "$final_path/install"\` If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galette_ynh" diff --git a/scripts/restore b/scripts/restore index c93218e..18da09d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,17 +1,14 @@ #!/bin/bash + #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= -if [ ! -e _common.sh ]; then - # Get the _common.sh file if it's not in the current directory - cp ../settings/scripts/_common.sh ./_common.sh - chmod a+rx _common.sh -fi -source _common.sh +#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c4af054..b2f042b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,7 +89,10 @@ ynh_setup_source "$final_path" mv "$final_path"/galette/* "$final_path"/ ynh_secure_remove "$final_path"/tests -cp "$final_path.old/config/config.inc.php" "$final_path/config/config.inc.php" +# when running automatic tests, there is no config.inc.php +if [ -e "$final_path.old/config/config.inc.php" ]; then + cp "$final_path.old/config/config.inc.php" "$final_path/config/config.inc.php" +fi # delete temp directory ynh_secure_remove "$final_path.old" @@ -185,8 +188,9 @@ User: "$db_name" Password: "$db_pwd" Name: "$db_name" -\`sudo chmod -R 500 "$final_path/config"\` -\`sudo rm -rf "$final_path/install"\` +Important! Once done, please remember to run as root or with sudo: +\`chmod -R 500 "$final_path/config"\` +\`rm -fr "$final_path/install"\` If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galette_ynh"