1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00

Update upgrade

This commit is contained in:
rocky-III 2022-10-19 02:31:55 +02:00 committed by GitHub
parent 0c3683e470
commit a2b44d0d1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,10 +100,23 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
tmpdir="$(mktemp -d)"
cp "$final_path/.htconfig.php" "$tmpdir/.htconfig.php"
cp "$final_path/php.log" "$tmpdir/php.log"
rsync -a "$final_path/store" "$tmpdir/."
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="store/ .htconfig.php php.log"
ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons"
cp "$tmpdir/.htconfig.php" "$final_path/.htconfig.php"
cp "$tmpdir/php.log" "$final_path/php.log"
rsync -a "$tmpdir/store" "$final_path/."
ynh_secure_remove --file="$tmpdir"
fi
fi
mkdir -p "$final_path/store"