mirror of
https://github.com/YunoHost-Apps/aeneria_ynh.git
synced 2024-09-03 18:06:15 +02:00
fix upgrade script
This commit is contained in:
parent
9bd6bef1a4
commit
0589491e11
1 changed files with 15 additions and 1 deletions
|
@ -46,8 +46,22 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..."
|
||||
|
||||
# For aeneria source update, we use a temporary directory because
|
||||
# without it, patches can't be apply correctly:
|
||||
# In 'app-00-ldap-auth.patch' we create a new file, if we try
|
||||
# to apply the patch a second time while the file already exists, it
|
||||
# throws a warning leading to an upgrade fail.
|
||||
|
||||
# Create tmpdir for new sources
|
||||
tmpdir="$(ynh_smart_mktemp min_size=300)"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" --full_replace
|
||||
ynh_setup_source --dest_dir="$tmpdir"
|
||||
|
||||
# Replace the old aeneria by the new one
|
||||
ynh_secure_remove --file="$install_dir"
|
||||
mv "$tmpdir" "$install_dir"
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
|
Loading…
Add table
Reference in a new issue