1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kiwiirc_ynh.git synced 2024-09-03 19:35:59 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2022-02-02 22:59:26 +01:00
parent e3130a231c
commit 095099be8d

View file

@ -71,22 +71,22 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=3 ynh_script_progression --message="Upgrading source files..." --weight=3
# 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/static/config.json" "$tmpdir/config.json" #cp -a "$final_path/static/config.json" "$tmpdir/config.json"
# 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 ynh_setup_source --dest_dir=$final_path --keep="$final_path/static/config.json"
#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/config.json" "$final_path/static/config.json" #cp -a "$tmpdir/config.json" "$final_path/static/config.json"
# Remove the tmp directory securely # Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir" #ynh_secure_remove --file="$tmpdir"
fi fi
chmod 750 "$final_path" chmod 750 "$final_path"