diff --git a/check_process b/check_process index 3de3894..8fcde4f 100644 --- a/check_process +++ b/check_process @@ -14,5 +14,4 @@ upgrade=1 backup_restore=1 multi_instance=1 - incorrect_path=1 port_already_use=0 diff --git a/manifest.json b/manifest.json index 9f26658..b71fd85 100644 --- a/manifest.json +++ b/manifest.json @@ -6,19 +6,19 @@ "en": "Minimalist web chat", "fr": "Web chat minimaliste" }, - "version": "1.0~ynh2", + "version": "1.0~ynh3", "url": "https://github.com/wojtek77/chat", "license": "MIT", "maintainer": { "name": "chtixof" }, "requirements": { - "yunohost": ">> 3.8.1" + "yunohost": ">> 4.1.7" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm" + "php7.3-fpm" ], "arguments": { "install" : [ diff --git a/scripts/install b/scripts/install index 4bc5e8b..4dfd6e4 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,6 @@ 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 -ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -79,7 +78,7 @@ ynh_system_user_create --username=$app #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -94,12 +93,12 @@ chown -R $app: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=3 +ynh_script_progression --message="Configuring permissions..." --weight=3 # Make app public if necessary or protect it if [ $is_public -eq 1 ] then - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9ccd45b..db333d0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,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) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= @@ -47,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 #=================================================