From 23f3b827582c10413897b82f746bdb73753f0f1a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Dec 2020 12:36:06 +0100 Subject: [PATCH] Fix linter warning --- README.md | 3 +-- check_process | 3 --- manifest.json | 2 +- scripts/backup | 1 - scripts/change_url | 14 +++++++------- scripts/install | 6 +++--- scripts/remove | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 13 +++---------- 9 files changed, 19 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index ce2385a..0e67939 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,7 @@ An addictive puzzle game inspired by Tetris. --- -Developer info ----------------- +## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/hextris_ynh/tree/testing). diff --git a/check_process b/check_process index 269b52f..4a3b94e 100644 --- a/check_process +++ b/check_process @@ -15,11 +15,8 @@ upgrade=1 from_commit=ec4da0af3abbd7b8bd59d5f7d9d7c594ae844ac0 backup_restore=1 multi_instance=1 - incorrect_path=1 port_already_use=0 change_url=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=none diff --git a/manifest.json b/manifest.json index c7c8481..a8720c1 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "aeris@e.email" }, "requirements": { - "yunohost": ">= 3.7.1" + "yunohost": ">= 3.8.1" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index be2b013..87e89d3 100755 --- a/scripts/backup +++ b/scripts/backup @@ -30,7 +30,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= - ynh_print_info --message="Declaring files to be backed up..." #================================================= diff --git a/scripts/change_url b/scripts/change_url index 3635e04..1160e7e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -50,23 +50,23 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -81,7 +81,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index b31ecb7..c5cfa22 100755 --- a/scripts/install +++ b/scripts/install @@ -60,9 +60,9 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=2 +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -89,7 +89,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 7d0a65d..5a76e4b 100755 --- a/scripts/remove +++ b/scripts/remove @@ -32,9 +32,9 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --weight=2 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2 -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index 0c6c38d..69d98c5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -43,7 +43,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the nginx configuration..." --weight=1 +ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -59,7 +59,7 @@ ynh_restore_file --origin_path="$final_path" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index fa4a9dd..279396a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,13 +68,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -92,9 +85,9 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -109,7 +102,7 @@ chown -R root: $final_path #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload