mirror of
https://github.com/YunoHost-Apps/grocy_ynh.git
synced 2024-09-03 19:25:54 +02:00
Update upgrade
This commit is contained in:
parent
b3e8ff96a3
commit
27891e4e8b
1 changed files with 12 additions and 0 deletions
|
@ -62,11 +62,23 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||
|
||||
# Create a temporary directory
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
||||
# Backup the config file in the temp dir
|
||||
cp -R "$final_path/data" "$tmpdir/data"
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
# Copy the admin saved settings from tmp directory to final path
|
||||
cp -RT "$tmpdir/data" "$final_path/data"
|
||||
|
||||
# Remove the tmp directory securely
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue