diff --git a/conf/app.src b/conf/app.src index fb15b69..27d6eaf 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,4 +3,3 @@ SOURCE_SUM=14098f6a1d1f1ef9569ddaf79bb2e29fe88b810d6831eb3de620297dea4ee4c2 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 556b622..549b52a 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; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file diff --git a/manifest.json b/manifest.json index 9105a46..a08f4f9 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Lightweight Blog-Engine", "fr": "Moteur de blog léger" }, - "version": "3.7.6~ynh5", + "version": "3.7.6~ynh6", "url": "https://blogotext.org/", "license": "MIT", "maintainer": { @@ -15,20 +15,19 @@ "url": "https://miaou.org" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -38,8 +37,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", @@ -58,8 +56,7 @@ }, { "name": "password", - "type": "password", - "example": "Choose a password" + "type": "password" } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh index 96277d7..8e2bf9a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-mysql 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" +pkg_dependencies="php${YNH_PHP_VERSION}-mysql 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" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 105732c..25c687f 100755 --- a/scripts/install +++ b/scripts/install @@ -49,6 +49,13 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=language --value=$language +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE A MYSQL DATABASE #================================================= @@ -94,7 +101,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/remove b/scripts/remove index 4940854..ca77864 100755 --- a/scripts/remove +++ b/scripts/remove @@ -29,6 +29,14 @@ ynh_script_progression --message="Removing the MySQL database" # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name +#================================================= +# 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 4ef5e76..d0b100e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,10 +33,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available $domain $path_url \ - || ynh_die "Path not available: ${domain}${path_url}" -test ! -d $final_path \ - || ynh_die "There is already a directory: $final_path " +test ! -d $final_path || ynh_die "There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -72,7 +69,13 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 88164ae..74d3985 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -101,6 +101,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 #=================================================