mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
remove previous sources during upgrade
This commit is contained in:
parent
d5c6261967
commit
1cfd8eed14
1 changed files with 18 additions and 3 deletions
|
@ -156,9 +156,24 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_print_info --message="Upgrading source files..."
|
||||
|
||||
architecture=$(ynh_detect_arch)
|
||||
# Create a temporary directory
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
||||
# Backup the env file in the temp dir
|
||||
cp -a "$final_path/.env" "$tmpdir/.env"
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
architecture=$(ynh_detect_arch)
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
||||
|
||||
#Copy the admin saved settings from tmp directory to final path
|
||||
cp -a "$tmpdir/.env" "$final_path/.env"
|
||||
|
||||
# Remove the tmp directory securely
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue