From 79c53163ae66a1e2a53bb00a5658df954613c74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:15:33 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 858f093..ffbbfe4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=4 ynh_setup_source --dest_dir="$install_dir" --keep=".env public/uploads/ public/dist/user.css" --full_replace=1 chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" +chown -R "$app:$app" "$install_dir" #================================================= # UPDATE A CONFIG FILE @@ -43,6 +43,14 @@ ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# CREATE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Creating a data directory..." --weight=1 + +chgrp "$app" -R "$install_dir/storage" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" +chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public/dist" "$install_dir/public/sym" "$data_dir/uploads" "$install_dir/bootstrap/" + #================================================= # INSTALL APP WITH COMPOSER #=================================================