From 881197fc583749e341311e28c024c50e21cb2031 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 7 Dec 2021 22:40:13 +0100 Subject: [PATCH] fix linter --- check_process | 6 +++--- conf/nginx.conf | 5 ----- manifest.json | 12 +++++------- scripts/install | 4 ++-- scripts/restore | 5 +---- 5 files changed, 11 insertions(+), 21 deletions(-) diff --git a/check_process b/check_process index 8afe689..6093ef5 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - admin="john" (USER) + domain="domain.tld" + admin="john" language="fr_FR" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=0 diff --git a/conf/nginx.conf b/conf/nginx.conf index 866fcc7..19c2c01 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,11 +6,6 @@ root __FINALPATH__/live/public; location / { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_set_header Accept-Encoding ""; try_files $uri @proxy; diff --git a/manifest.json b/manifest.json index d5106e9..662f34a 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "mastodon", "packaging_format": 1, "description": { - "en": "A libre and federated social network.", - "fr": "Un réseau social libre et fédéré." + "en": "Libre and federated social network.", + "fr": "Réseau social libre et fédéré." }, "version": "3.4.1~ynh4", "url": "https://github.com/tootsuite/mastodon", @@ -23,7 +23,7 @@ } ], "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -33,13 +33,11 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index 2a1edf4..748fcb1 100644 --- a/scripts/install +++ b/scripts/install @@ -75,8 +75,8 @@ ynh_app_setting_set --app=$app --key=port_stream --value=$port_stream #================================================= ynh_script_progression --message="Installing dependencies..." -ynh_install_app_dependencies $pkg_dependencies -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" ynh_install_ruby --ruby_version=$RUBY_VERSION diff --git a/scripts/restore b/scripts/restore index 7a3808b..68ff2b0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -41,10 +41,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS