From 433c4cfaf7e52c44d06f053cf4c2f42bc67abe6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 10 Jan 2023 23:54:32 +0100 Subject: [PATCH] Fix linter --- conf/systemd.service | 2 +- doc/DESCRIPTION.md | 2 +- manifest.json | 2 +- scripts/backup | 7 ------- scripts/change_url | 6 ------ scripts/install | 9 +-------- scripts/remove | 10 +--------- scripts/restore | 11 +---------- scripts/upgrade | 8 +------- 9 files changed, 7 insertions(+), 50 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index e2a16fb..b20b7ef 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Small description of the service +Description=Fider: Open feedback platform After=network.target [Service] diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 4e8fcb3..da60309 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -3,7 +3,7 @@ Fider is a feedback portal that helps teams collect and prioritize customer feed ### Features - Share ideas, vote and discuss -- Authentication with support for Github, Facebook, Google, and custom OAuth providers +- Authentication with support for GitHub, Facebook, Google, and custom OAuth providers - Customizable branding - Public API, webhooks etc - Markdown support diff --git a/manifest.json b/manifest.json index d8ad0d6..555fab9 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,7 @@ "email": "felix@piedallu.me" }, "requirements": { - "yunohost": ">= 11.0.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index 28c2877..61ab794 100755 --- a/scripts/backup +++ b/scripts/backup @@ -49,13 +49,6 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP FAIL2BAN CONFIGURATION -#================================================= - -# ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" -# ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" - #================================================= # SPECIFIC BACKUP #================================================= diff --git a/scripts/change_url b/scripts/change_url index 91b2a47..beca2a9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -106,12 +106,6 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -# ... -#================================================= - #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/install b/scripts/install index afbc6a2..80785c2 100755 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,6 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -# path_url=$YNH_APP_ARG_PATH path_url=/ is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE @@ -69,7 +68,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_script_progression --message="Installing dependencies..." --weight=1 -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies install_golang_from_backports ynh_install_nodejs --nodejs_version=$nodejs_version @@ -100,12 +99,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path/sources" -# FIXME: this should be managed by the core in the future -# Here, as a packager, you may have to tweak the ownerhsip/permissions -# such that the appropriate users (e.g. maybe www-data) can access -# files in some cases. -# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - -# this will be treated as a security issue. chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" diff --git a/scripts/remove b/scripts/remove index 1e7b417..1d8687e 100755 --- a/scripts/remove +++ b/scripts/remove @@ -81,17 +81,9 @@ ynh_remove_nginx_config ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove metapackage and its dependencies -ynh_remove_app_dependencies +ynh_exec_warn_less ynh_remove_app_dependencies ynh_remove_nodejs -#================================================= -# REMOVE FAIL2BAN CONFIGURATION -#================================================= -# ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=1 - -# Remove the dedicated Fail2Ban config -# ynh_remove_fail2ban_config - #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/restore b/scripts/restore index 86fe83e..89b2b3e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -65,15 +65,6 @@ chown -R $app:www-data "$final_path" chmod +x "$final_path/run_fider" -#================================================= -# RESTORE FAIL2BAN CONFIGURATION -#================================================= -# ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=1 - -# ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" -# ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" -# ynh_systemd_action --action=restart --service_name=fail2ban - #================================================= # SPECIFIC RESTORATION #================================================= @@ -82,7 +73,7 @@ chmod +x "$final_path/run_fider" ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies install_golang_from_backports #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7b56df0..2f4dfd9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -91,12 +91,6 @@ then ynh_setup_source --dest_dir="$final_path" fi -# FIXME: this should be managed by the core in the future -# Here, as a packager, you may have to tweak the ownerhsip/permissions -# such that the appropriate users (e.g. maybe www-data) can access -# files in some cases. -# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - -# this will be treated as a security issue. chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -106,7 +100,7 @@ chown -R $app:www-data "$final_path" #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=1 -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies install_golang_from_backports #=================================================