From 9cc368e1951a2e77964e8365e3d16235fd115f62 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Nov 2021 10:30:22 +0100 Subject: [PATCH] 4.3 --- check_process | 10 ++++------ conf/app.src | 1 - conf/nginx.conf | 5 ----- manifest.json | 8 +++----- scripts/_common.sh | 5 +---- scripts/install | 3 +-- scripts/restore | 2 +- scripts/upgrade | 2 +- 8 files changed, 11 insertions(+), 25 deletions(-) diff --git a/check_process b/check_process index a0da37a..cbb9bbe 100644 --- a/check_process +++ b/check_process @@ -1,10 +1,10 @@ ;; Complete test ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) + domain="domain.tld" + path="/path" + admin="john" language="en" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 @@ -16,8 +16,6 @@ upgrade=1 from_commit=45f0c70e9d96fa522cac82a210968a3e6379dd53 backup_restore=1 multi_instance=1 - incorrect_path=1 - port_already_use=0 change_url=1 ;;; Options Email= diff --git a/conf/app.src b/conf/app.src index f51d29e..45a48b4 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,4 +3,3 @@ SOURCE_SUM=2923c3aee79a02154c2168537a18250abe6a3a84fd7b4a5f0309bd7ad604a98b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= diff --git a/conf/nginx.conf b/conf/nginx.conf index 2bf72a2..1b4422b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/public/; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - client_body_timeout 60m; proxy_read_timeout 60m; fastcgi_read_timeout 60m; diff --git a/manifest.json b/manifest.json index 44f98b1..2a47928 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "bonjour@aeneria.com" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -26,8 +26,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", @@ -46,8 +45,7 @@ }, { "name": "admin", - "type": "user", - "example": "homer" + "type": "user" } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh index eb5147a..8da29ca 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,12 +4,9 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="apt-transport-https postgresql postgresql-contrib" - YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-ldap" +pkg_dependencies="apt-transport-https postgresql postgresql-contrib php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-ldap" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index a3d16db..b99afa3 100644 --- a/scripts/install +++ b/scripts/install @@ -24,7 +24,6 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC - deskey=$(ynh_string_random --length=24) app=$YNH_APP_INSTANCE_NAME @@ -106,7 +105,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated php-fpm config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/restore b/scripts/restore index 5325b8b..e77ce4d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -76,7 +76,7 @@ ynh_script_progression --message="Restoring PHP-FPM configuration..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 2b52f6f..4e6fc5f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,7 +132,7 @@ ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies" ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated php-fpm config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low #================================================= # SPECIFIC SETUP