From dbf5ca97d6cffc706f003b894743cd4c0def2e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 14 Dec 2020 11:12:27 +0100 Subject: [PATCH] Fix linter warnings (#90) * Fix linter warnings --- check_process | 3 --- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/install | 8 +++----- scripts/restore | 13 ++++++++++--- scripts/upgrade | 12 +++--------- 6 files changed, 18 insertions(+), 22 deletions(-) diff --git a/check_process b/check_process index 510f4c2..55c91c9 100644 --- a/check_process +++ b/check_process @@ -13,11 +13,8 @@ upgrade=1 from_commit=e27175c2dde0ebbd483b212dc76c5b27877e4ed2 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 f5e2f57..dd1f625 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "News feed (RSS/Atom) reader and aggregator.", "fr": "Lecteur de flux d’actualité utilisant les protocoles RSS et Atom." }, - "version": "20200916~ynh1", + "version": "20200916~ynh2", "url": "http://tt-rss.org", "license": "GPL-3.0-only", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 3070a73..f6a26c1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -47,7 +47,7 @@ ynh_smart_mktemp () { ynh_die "Insufficient free space to continue..." fi - echo "$(sudo mktemp --directory --tmpdir="$tmpdir")" + echo "$(mktemp --directory --tmpdir="$tmpdir")" } #================================================= diff --git a/scripts/install b/scripts/install index 60d1b0c..351f730 100644 --- a/scripts/install +++ b/scripts/install @@ -33,9 +33,6 @@ ynh_script_progression --message="Validating installation parameters..." --weigh final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" -# Normalize the url path syntax -path_url=$(ynh_normalize_url_path $path_url) - # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -90,7 +87,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -147,8 +144,9 @@ ynh_systemd_action --service_name=$app --action=start #================================================= # ADVERTISE SERVICE IN ADMIN PANEL #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app +yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index e4dde4d..a8477e0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -77,7 +77,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +ynh_add_fpm_config --package="$extra_php_dependencies" #================================================= # RESTORE THE MYSQL DATABASE @@ -88,13 +88,20 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# ADVERTISE SERVICE IN ADMIN PANEL +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log" + #================================================= # RESTORE SYSTEMD #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=2 +ynh_script_progression --message="Restoring the systemd configuration..." --weight=2 ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -systemctl enable $app.service +systemctl enable $app.service --quiet ynh_systemd_action --service_name=$app --action=start #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index cd2626b..9a01a43 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,13 +68,6 @@ ynh_abort_if_errors # Remove old cron job ynh_secure_remove --file="/etc/cron.d/$app" -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -114,7 +107,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +ynh_add_fpm_config --package="$extra_php_dependencies" #================================================= # SPECIFIC UPGRADE @@ -185,8 +178,9 @@ ynh_systemd_action --service_name=$app --action=restart #================================================= # ADVERTISE SERVICE IN ADMIN PANEL #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app +yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log" #================================================= # GENERIC FINALIZATION