Avoid upgrade crash if data_dir already exist

This commit is contained in:
Josué Tille 2023-10-26 10:33:04 +02:00
parent cf66fcf714
commit c94e9d1f1a
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF

View file

@ -70,6 +70,9 @@ if [ $(readlink $install_dir/seafile-data) == '/home/yunohost.app/seafile-data'
ln -s $data_dir $install_dir/seafile-data ln -s $data_dir $install_dir/seafile-data
fi fi
if [ -e /home/yunohost.app/seafile-data ]; then 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 mv /home/yunohost.app/seafile-data $data_dir
fi fi