diff --git a/conf/nginx.conf b/conf/nginx.conf index 7ade319..fd1606c 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; try_files $uri @__NAME__; diff --git a/manifest.json b/manifest.json index 627a225..a1064f3 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,7 @@ "email": "plopoyop@gmail.com" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -32,8 +32,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", diff --git a/scripts/_common.sh b/scripts/_common.sh index c949e71..29f5da3 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,12 +4,9 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="ffmpeg" - YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-mbstring" +pkg_dependencies="ffmpeg php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-mbstring" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index aa16274..6246242 100755 --- a/scripts/install +++ b/scripts/install @@ -92,11 +92,12 @@ 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 #================================================= # SPECIFIC SETUP #================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 cp ../conf/config.yml "$final_path/config/" diff --git a/scripts/restore b/scripts/restore index 409cdaa..6209a14 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,10 +34,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -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 @@ -74,9 +71,6 @@ ynh_script_progression --message="Restoring PHP-FPM configuration..." 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" - #================================================= # SPECIFIC RESTORATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 421787f..b30af76 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -106,7 +105,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Upgrading PHP-FPM configuration..." --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 #================================================= # SPECIFIC UPGRADE