mirror of
https://github.com/YunoHost-Apps/matomo_ynh.git
synced 2024-09-03 19:45:56 +02:00
Update upgrade
This commit is contained in:
parent
3bf27f6e09
commit
79265a89c4
1 changed files with 20 additions and 0 deletions
|
@ -80,8 +80,28 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
|
# Create a temporary directory
|
||||||
|
tmpdir="$(mktemp -d)"
|
||||||
|
# Backup the config file in the temp dir
|
||||||
|
cp -a "$final_path/config/config.ini.php" "$tmpdir/config.ini.php"
|
||||||
|
|
||||||
|
# Remove the app directory securely
|
||||||
|
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"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
|
#Copy the admin saved settings from tmp directory to final path
|
||||||
|
cp -a "$tmpdir/config.ini.php" "$final_path/config/config.ini.php"
|
||||||
|
|
||||||
|
# Remove the tmp directory securely
|
||||||
|
ynh_secure_remove --file="$tmpdir"
|
||||||
|
|
||||||
|
pushd "$final_path"
|
||||||
|
chown -R $app: $final_path/tmp/*
|
||||||
|
./console core:update
|
||||||
|
popd
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue