mirror of
https://github.com/YunoHost-Apps/lychee_ynh.git
synced 2024-09-03 19:36:36 +02:00
Update upgrade
This commit is contained in:
parent
f0ca9a64a7
commit
cd7a006c10
1 changed files with 16 additions and 3 deletions
|
@ -77,9 +77,25 @@ ynh_abort_if_errors
|
|||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=4
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
||||
# Backup the config file in the temp dir
|
||||
cp -a "$final_path/public/dist/user.css" "$tmpdir/user.css"
|
||||
cp -R "$final_path/public/dist/uploads" "$tmpdir/uploads"
|
||||
|
||||
# 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 -a "$tmpdir/user.css" "$final_path/public/dist/user.css"
|
||||
cp -R "$final_path/uploads" "$final_path/public/dist/uploads"
|
||||
|
||||
# Remove the tmp directory securely
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -128,9 +144,6 @@ ynh_backup_if_checksum_is_different --file="$final_path/.env"
|
|||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$final_path/.env"
|
||||
|
||||
# Setup custom user.css file
|
||||
cp ../conf/user.css.example $final_path/public/dist/user.css
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue