diff --git a/conf/nginx.conf b/conf/nginx.conf index d31c18a..78fd2d2 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php feed.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file diff --git a/manifest.json b/manifest.json index 6f3e41d..c7f257e 100644 --- a/manifest.json +++ b/manifest.json @@ -25,7 +25,7 @@ "php7.3-fpm" ], "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "arguments": { "install" : [ diff --git a/scripts/_common.sh b/scripts/_common.sh index f8311e3..978249f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ YNH_PHP_VERSION="7.3" # dependencies used by the app -extra_php_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-intl" +pkg_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-intl" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 7c3e9d0..137b7fd 100755 --- a/scripts/install +++ b/scripts/install @@ -65,6 +65,13 @@ ynh_script_progression --message="Finding an available port..." --weight=1 port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= diff --git a/scripts/remove b/scripts/remove index be4d46c..f1521b7 100755 --- a/scripts/remove +++ b/scripts/remove @@ -20,6 +20,14 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index b1309b0..df7d683 100755 --- a/scripts/restore +++ b/scripts/restore @@ -89,6 +89,14 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c1db6d1..e7e6531 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,6 +95,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # PHP-FPM CONFIGURATION #=================================================