mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
[fix] Use the old owncloud method to copy apps dir
This commit is contained in:
parent
3b16063a82
commit
c71a444a94
1 changed files with 5 additions and 3 deletions
|
@ -49,7 +49,7 @@ fi
|
||||||
current_version=$(grep OC_VersionString "$final_path/version.php" | cut -d\' -f2)
|
current_version=$(grep OC_VersionString "$final_path/version.php" | cut -d\' -f2)
|
||||||
current_major_version=${current_version%%.*}
|
current_major_version=${current_version%%.*}
|
||||||
|
|
||||||
if [ $current_major_version -gt 11 ]
|
if [ $current_major_version -gt 15 ]
|
||||||
then
|
then
|
||||||
# Inform the backup/restore process that it should not save the data directory
|
# Inform the backup/restore process that it should not save the data directory
|
||||||
ynh_app_setting_set $app backup_core_only 1
|
ynh_app_setting_set $app backup_core_only 1
|
||||||
|
@ -205,8 +205,10 @@ do
|
||||||
# Backup 3rd party applications from the current nextcloud
|
# Backup 3rd party applications from the current nextcloud
|
||||||
# But do not overwrite if there is any upgrade
|
# But do not overwrite if there is any upgrade
|
||||||
# (apps directory already exists in Nextcloud archive)
|
# (apps directory already exists in Nextcloud archive)
|
||||||
touch -t 197001010000 $final_path/apps/*
|
for nc_app_dir in $(sudo ls "${final_path}/apps"); do
|
||||||
cp -a --update "$final_path/apps" "$tmpdir"
|
[[ ! -d "${tmpdir}/apps/${nc_app_dir}" ]] \
|
||||||
|
&& cp -a "${final_path}/apps/${nc_app_dir}" "${tmpdir}/apps/${nc_app_dir}"
|
||||||
|
done
|
||||||
|
|
||||||
# Replace the old nextcloud by the new one
|
# Replace the old nextcloud by the new one
|
||||||
ynh_secure_remove "$final_path"
|
ynh_secure_remove "$final_path"
|
||||||
|
|
Loading…
Add table
Reference in a new issue