From 39820bb2497c890c4546a55f67300b6a93b99af1 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Mon, 28 Aug 2017 02:13:22 +0200 Subject: [PATCH] [fix] Upgrade previous version --- scripts/upgrade | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6a18800..e4c6803 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,6 +32,12 @@ elif [ "$is_public" = "No" ]; then is_public=0 fi +# If final_path doesn't exist, create it +if [ -z $final_path ]; then + final_path=/var/www/$app + ynh_app_setting_set $app final_path $final_path +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -55,7 +61,6 @@ path_url=$(ynh_normalize_url_path $path_url) # COPY SOURCES #================================================= -ynh_app_setting_set $app final_path $final_path # Copy files to the right place cp -a ../sources/. $final_path