From ea3e5797d4ce9cb87d773a47a2f91652d6d8abcf Mon Sep 17 00:00:00 2001 From: Thatoo Date: Sun, 30 Jun 2019 15:43:17 +0200 Subject: [PATCH] Update upgrade Moved the remove command and co into the if [ "$upgrade_type" == "UPGRADE_APP" ] block --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9c1bf3f..ab93dc2 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,17 +25,17 @@ path=${path%/} # Retreive sources and install them src_path=/var/www/$app -sudo rm -rf $src_path -sudo mkdir -p $src_path if [ "$upgrade_type" == "UPGRADE_APP" ] then + sudo rm -rf $src_path + sudo mkdir -p $src_path ynh_script_progression --message="Upgrading source files..." --time --weight=1 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir=$src_path + sudo chown -R www-data: $src_path fi -sudo chown -R www-data: $src_path # Modify Nginx configuration file and copy it to Nginx conf directory nginx_conf=../conf/nginx.conf