mirror of
https://github.com/YunoHost-Apps/bookstack_ynh.git
synced 2024-09-03 18:16:02 +02:00
Update upgrade
This commit is contained in:
parent
24ba2e423c
commit
ffc1ca65fb
1 changed files with 10 additions and 10 deletions
|
@ -62,26 +62,26 @@ then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Create a temporary directory
|
# Create a temporary directory
|
||||||
tmpdir="$(mktemp -d)"
|
#tmpdir="$(mktemp -d)"
|
||||||
|
|
||||||
# Backup the config file in the temp dir
|
# Backup the config file in the temp dir
|
||||||
cp -a "$final_path/.env" "$tmpdir/.env"
|
#cp -a "$final_path/.env" "$tmpdir/.env"
|
||||||
cp -a "$final_path/public/uploads" "$tmpdir/public/uploads"
|
#cp -a "$final_path/public/uploads" "$tmpdir/public/uploads"
|
||||||
cp -a "$final_path/storage/uploads" "$tmpdir/storage/uploads"
|
#cp -a "$final_path/storage/uploads" "$tmpdir/storage/uploads"
|
||||||
|
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="$final_path"
|
#ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env"
|
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env $final_path/public/uploads $final_path/storage/uploads"
|
||||||
|
|
||||||
# Copy the admin saved settings from tmp directory to final path
|
# Copy the admin saved settings from tmp directory to final path
|
||||||
cp -a "$tmpdir/.env" "$final_path/.env"
|
#cp -a "$tmpdir/.env" "$final_path/.env"
|
||||||
cp -a "$tmpdir/public/uploads" "$final_path/public/uploads"
|
#cp -a "$tmpdir/public/uploads" "$final_path/public/uploads"
|
||||||
cp -a "$tmpdir/storage/uploads" "$final_path/storage/uploads"
|
#cp -a "$tmpdir/storage/uploads" "$final_path/storage/uploads"
|
||||||
|
|
||||||
# Remove the tmp directory securely
|
# Remove the tmp directory securely
|
||||||
ynh_secure_remove --file="$tmpdir"
|
#ynh_secure_remove --file="$tmpdir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue