Fix seafile_data management

This commit is contained in:
Josué Tille 2020-05-01 16:39:15 +02:00
parent 1d08f40f84
commit 5ca79c9d96
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF

View file

@ -70,8 +70,12 @@ if [ $final_path == "/var/www/$app" ]; then
ynh_system_user_create --username $seafile_user --home_dir $final_path ynh_system_user_create --username $seafile_user --home_dir $final_path
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
echo '/home/yunohost.app/seafile-data' > /opt/yunohost/seafile/ccnet/seafile.ini if ! [ -z "$(ls -A $final_path/seafile_data)" ]; then
mv /opt/yunohost/$app/seafile-data/* /home/yunohost.app/seafile-data/ # 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/
ynh_secure_remove $final_path/seafile_data
ln -s $seafile_data $final_path/seafile_data
fi
ln -s $final_path/logs /var/log/seafile ln -s $final_path/logs /var/log/seafile
set_permission set_permission
fi fi