From d2385ded062c7b296f43690adc017febd6e6b3cc Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 21 Jan 2023 01:33:53 +0700 Subject: [PATCH] Update upgrade --- scripts/upgrade | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d7b07b3..243f91e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,6 +58,9 @@ ynh_system_user_create --username=$app --home_dir="$final_path" # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +# Remove www file +ynh_secure_remove --file="$final_path/*" + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 @@ -73,8 +76,6 @@ chown -R $app:www-data "$final_path" pushd "$final_path" ynh_exec_warn_less sudo -u $app mv ./www_data/* . ynh_exec_warn_less sudo -u $app ./module/install.sh - ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < db/table.sql - ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < db/demo.sql popd #=================================================