diff --git a/README.md b/README.md index d618a52..b15f1e1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Simple, Fast, Secure, Flat-File CMS -**Shipped version:** 3.13.1~ynh7 +**Shipped version:** 3.14.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5010969..3ee9f53 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour CMS simple, rapide, sécurisé et à fichier plat -**Version incluse :** 3.13.1~ynh7 +**Version incluse :** 3.14.0~ynh1 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 2754174..b3265d2 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/bludit/bludit/archive/3.13.1.tar.gz -SOURCE_SUM=ec0f262335d371d9123110c55866b562b7e0238a20db2ac9f6b284d2ac3426ed +SOURCE_URL=https://github.com/bludit/bludit/archive/3.14.0.tar.gz +SOURCE_SUM=4a411cdcd9d3412a87cc89f9f1067bef51533b8c9303f1bc34452e30ad5b586c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 769b154..c02ebe4 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; client_max_body_size 10M; diff --git a/manifest.json b/manifest.json index ba58d8d..fb879d2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Simple, Fast, Secure, Flat-File CMS", "fr": "CMS simple, rapide, sécurisé et à fichier plat" }, - "version": "3.13.1~ynh7", + "version": "3.14.0~ynh1", "url": "www.bludit.com", "upstream": { "license": "MIT", @@ -20,12 +20,12 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ "nginx", - "php7.3-fpm" + "php7.4-fpm" ], "arguments": { "install" : [ diff --git a/scripts/_common.sh b/scripts/_common.sh index a3e80ec..c9c6ad2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,9 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="7.4" -extra_php_dependencies="php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom" +pkg_dependencies="php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index f8af543..a32ba47 100644 --- a/scripts/install +++ b/scripts/install @@ -45,6 +45,13 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= @@ -66,6 +73,15 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 + +# Create a dedicated PHP-FPM config +ynh_add_fpm_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + #================================================= # NGINX CONFIGURATION #================================================= @@ -74,15 +90,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 - -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/remove b/scripts/remove index f10acda..abd4725 100644 --- a/scripts/remove +++ b/scripts/remove @@ -44,6 +44,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE DEDICATED USER #================================================= diff --git a/scripts/restore b/scripts/restore index 9f67c71..bcef493 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,12 +37,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -62,14 +56,28 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# SPECIFIC RESTORATION +#================================================= +# REINSTALL DEPENDENCIES +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6 +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index c1da157..0f348d7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,14 +59,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # CREATE DEDICATED USER #================================================= @@ -97,11 +89,11 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" #================================================= -# RELOAD NGINX +# UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 +ynh_script_progression --message="Upgrading dependencies..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +ynh_install_app_dependencies $pkg_dependencies #================================================= # PHP-FPM CONFIGURATION @@ -109,7 +101,22 @@ ynh_systemd_action --service_name=nginx --action=reload ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config + +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 + +# Create a dedicated NGINX config +ynh_add_nginx_config + +#================================================= +# RELOAD NGINX +#================================================= +ynh_script_progression --message="Reloading NGINX web server..." --weight=2 + +ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT