diff --git a/manifest.json b/manifest.json index 103ddcf..c5034ff 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "url": "" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.0.0" }, "previous_maintainers": { "name": "courgette", @@ -25,7 +25,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { diff --git a/scripts/install b/scripts/install index 7cda4a4..08c263c 100644 --- a/scripts/install +++ b/scripts/install @@ -90,7 +90,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated php-fpm config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) # copy index file @@ -117,10 +117,13 @@ ynh_store_file_checksum "$final_path/user/config.php" chown -R $app: $final_path -# Reload Nginx and regenerate SSOwat conf +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Configuring permissions..." --time --weight=1 # 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" #================================================= # RELOAD NGINX diff --git a/scripts/remove b/scripts/remove index bfc5c6f..010c3f0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -43,7 +43,6 @@ ynh_script_progression --message="Removing YOURLS main directory..." --weight=4 # Remove the app directory securely ynh_secure_remove --file="$final_path" - #================================================= # REMOVE NGINX CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 528aa4b..d3d9d20 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -44,6 +44,14 @@ if [ -z "$final_path" ]; then final_path=/var/www/$app 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 #================================================= @@ -108,7 +116,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +ynh_add_fpm_config --package="$extra_php_dependencies" #================================================= # MODIFY A CONFIG FILE