diff --git a/README.md b/README.md index 2fc83c9..a1f369e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Cachet for YunoHost [![Integration level](https://dash.yunohost.org/integration/cachet.svg)](https://dash.yunohost.org/appci/app/cachet) ![](https://ci-apps.yunohost.org/ci/badges/cachet.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cachet.maintain.svg) -[![Install cachet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cachet) +[![Install cachet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cachet) > *This package allows you to install Cachet quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* diff --git a/check_process b/check_process index 787ad0e..b92cd43 100644 --- a/check_process +++ b/check_process @@ -16,11 +16,8 @@ upgrade=1 from_commit=7497ea8b6915b725358db0d4a1210f999961cfee backup_restore=1 multi_instance=1 - incorrect_path=0 port_already_use=0 change_url=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=none diff --git a/manifest.json b/manifest.json index 287e811..6e400a0 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source status page system", "fr": "Système de page de statut open source" }, - "version": "2.4.0-dev-7897744356bf81a2bcbc734f132eb5daafa889611c9c72fb2501afb3e9007cac~ynh2", + "version": "2.3.18~ynh2", "url": "https://cachethq.io/", "license": "BSD-3-Clause", "maintainer": { @@ -14,12 +14,12 @@ "email": "jimmy@monin.net" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { @@ -27,19 +27,11 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Cachet", - "fr": "Choisissez un domaine pour Cachet" - }, "example": "domain.org" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the only allowed admin user", - "fr": "Choisissez l'unique utilisateur autorisé" - }, "example": "johndoe" }, { @@ -55,10 +47,6 @@ { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": true }, { diff --git a/scripts/install b/scripts/install index bab2e5a..1ecbab6 100644 --- a/scripts/install +++ b/scripts/install @@ -54,7 +54,6 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain 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=admin_password --value=$admin_password -ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=language --value=$language #================================================= @@ -187,13 +186,12 @@ chown -R $app: "${final_path}/.env" "${final_path}/storage/" "${final_path}/boot #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=2 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then - # unprotected_uris allows SSO credentials to be passed anyway. - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 67ab5bc..49a727c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) @@ -35,15 +34,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) @@ -56,6 +46,13 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -163,18 +160,6 @@ ynh_secure_remove --file=bootstrap/cache/* chown -R root: $final_path chown -R $app: "${final_path}/.env" "${final_path}/storage/" "${final_path}/bootstrap/" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # unprotected_uris allows SSO credentials to be passed anyway - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" -fi - #================================================= # SET MAINTENANCE MODE OFF #=================================================