From 46e9b23461bf77c5fa1cb5414a925fb0e21db1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Peterka?= Date: Mon, 2 Nov 2020 15:38:09 +0100 Subject: [PATCH] Upgrade transfers data and does not lose them --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9340cb4..47361c3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,8 +71,8 @@ if [ $final_path == "/var/www/$app" ]; then ynh_app_setting_set --app $app --key final_path --value $final_path test -e /var/log/seafile && rm /var/log/$app if ! [ -z "$(ls -A $final_path/seafile_data)" ]; then - # Data directory empty, so considere that all data are already in /home/yunohost.app/seafile - mv /opt/yunohost/$app/seafile-data/* /home/yunohost.app/seafile-data/ + # Data directory NOT empty, transfer data to /home/yunohost.app/seafile + mv $final_path/seafile_data/* /home/yunohost.app/seafile-data/ ynh_secure_remove $final_path/seafile_data ln -s /home/yunohost.app/seafile-data $final_path/ fi