mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Upgrade transfers data and does not lose them
This commit is contained in:
parent
079eb9ad9b
commit
46e9b23461
1 changed files with 2 additions and 2 deletions
|
@ -71,8 +71,8 @@ if [ $final_path == "/var/www/$app" ]; then
|
||||||
ynh_app_setting_set --app $app --key final_path --value $final_path
|
ynh_app_setting_set --app $app --key final_path --value $final_path
|
||||||
test -e /var/log/seafile && rm /var/log/$app
|
test -e /var/log/seafile && rm /var/log/$app
|
||||||
if ! [ -z "$(ls -A $final_path/seafile_data)" ]; then
|
if ! [ -z "$(ls -A $final_path/seafile_data)" ]; then
|
||||||
# Data directory empty, so considere that all data are already in /home/yunohost.app/seafile
|
# Data directory NOT empty, transfer data to /home/yunohost.app/seafile
|
||||||
mv /opt/yunohost/$app/seafile-data/* /home/yunohost.app/seafile-data/
|
mv $final_path/seafile_data/* /home/yunohost.app/seafile-data/
|
||||||
ynh_secure_remove $final_path/seafile_data
|
ynh_secure_remove $final_path/seafile_data
|
||||||
ln -s /home/yunohost.app/seafile-data $final_path/
|
ln -s /home/yunohost.app/seafile-data $final_path/
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue