From c94e9d1f1a365aef138406cd35f687d5bb50bb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 26 Oct 2023 10:33:04 +0200 Subject: [PATCH] Avoid upgrade crash if data_dir already exist --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 324b48f..cc55473 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,6 +70,9 @@ if [ $(readlink $install_dir/seafile-data) == '/home/yunohost.app/seafile-data' ln -s $data_dir $install_dir/seafile-data fi if [ -e /home/yunohost.app/seafile-data ]; then + if [ -e $data_dir ]; then + mv $data_dir $data_dir$(date '+%Y%m%d.%H%M%S') + fi mv /home/yunohost.app/seafile-data $data_dir fi