From 0ef89f30d12e1e6b2510b926aaa8f14c7507c269 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 29 Jan 2021 16:41:06 +0100 Subject: [PATCH] Fix --- scripts/restore | 1 + scripts/upgrade | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/restore b/scripts/restore index e6ff641..7609fc9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -68,6 +68,7 @@ ynh_system_user_create --username=$app # Restore permissions on app files chown -R $app: $final_path +chmod -R 755 $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 99878f5..0ed20e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -90,18 +90,13 @@ ynh_install_composer #================================================= # INSTALL AND INITIALIZE COMPOSER #================================================= -ynh_script_progression --message="Installing Composer..." --weight=10 +ynh_script_progression --message="Upgrading source files..." --weight=10 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then +pushd $final_path # install the PHP dependencies using Composer ynh_exec_warn_less ynh_composer_exec --commands="install --no-dev" - - ynh_script_progression --message="Upgrading source files..." --weight=4 - pushd $final_path - php$phpversion artisan migrate && php$phpversion artisan cache:clear && php$phpversion artisan view:clear - popd -fi + php$phpversion artisan migrate && php$phpversion artisan cache:clear && php$phpversion artisan view:clear +popd #================================================= # GENERIC FINALIZATION @@ -111,6 +106,7 @@ fi # Set permissions on app files chown -R $app: $final_path +chmod -R 755 $final_path #================================================= # RELOAD NGINX