diff --git a/scripts/upgrade b/scripts/upgrade index 7519f47..d6caf5d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,6 +72,12 @@ ynh_system_user_create --username=$app --home_dir="$final_path" # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +# Moved fron /opt to /var/www +if [ -d "/opt/yunohost/$app" ]; then + rm -rf "$final_path" + mv "/opt/yunohost/$app" "$final_path" +fi + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1