diff --git a/README.md b/README.md index 91b6f969..c18f2b64 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ In addition to taking over the functionality of Instagram, the functioning of Pi It is also possible to import your data from Instagram. -**Shipped version:** 0.11.5~ynh3 +**Shipped version:** 0.11.6~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index f47d75fa..a9a4c2f5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -26,7 +26,7 @@ En plus de reprendre les fonctionnalités d'Instagram, le fonctionnement de Pixe Il est également possible d'importer ses données depuis Instagram. -**Version incluse :** 0.11.5~ynh3 +**Version incluse :** 0.11.6~ynh2 ## Captures d’écran diff --git a/scripts/_common.sh b/scripts/_common.sh index 909c6fec..a315bd1b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_COMPOSER_VERSION="2.1.5" +YNH_COMPOSER_VERSION="2.2.21" #================================================= # PERSONAL HELPERS diff --git a/scripts/upgrade b/scripts/upgrade index 4254c110..092fb00b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,7 +48,7 @@ if [ -z "${fpm_usage:-}" ]; then fi # If app_key doesn't exist, retrieve it -if [ -z "$app_key" ]; then +if [ -z "${app_key:-}" ]; then ynh_script_progression --message="Retrieving app_key..." app_key=$(grep -oP "APP_KEY=\Kbase64.*" "$install_dir/.env") ynh_app_setting_set --app="$app" --key=app_key --value="$app_key" @@ -73,7 +73,6 @@ if dpkg --compare-versions "0.10.9~ynh2" gt "$(ynh_read_manifest --manifest="/et chown -R $app: "/var/log/$app/" ynh_script_progression --message="Configuring a supervisor service..." - phpversion=$YNH_PHP_VERSION ynh_add_supervisor_config --service="${app}-horizon" --template=horizon.conf ynh_script_progression --message="Starting a supervisor service..." @@ -116,7 +115,7 @@ chmod 600 "$install_dir"/.env ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint #================================================= # NGINX CONFIGURATION @@ -137,6 +136,21 @@ ynh_exec_warn_less ynh_composer_exec --workdir="$install_dir" --commands="self-u ynh_exec_warn_less ynh_composer_exec --workdir="$install_dir" --commands="update" +#================================================= +# PATCH PERMISSIONS for v0.11.5 versions and higher +#================================================= +ynh_script_progression --message="Patching permissions (for version 0.11.5 and newer)..." --weight=1 + +# Default configuration doesn't work +ynh_replace_string --match_string="'private' => 0700," --replace_string="'private' => 0750," --target_file=$install_dir/config/filesystems.php + +# Repair permissions for files created after v0.11.5 and before this patch +if [ -d "$install_dir/public/storage/m/_v2/" ]; then + chmod 750 -R "$install_dir/public/storage/m/_v2/"* # all files subdirectories (picture folders) should be readable and executable. But if there is no picture, there is no /*/* + chmod 770 "$install_dir/public/storage/m/_v2/"* # users folders should be 770 + chmod 770 "$install_dir/public/storage/m/_v2/" # this should be 770 +fi + #================================================= # DEPLOYMENT #=================================================