1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shaarli_ynh.git synced 2024-09-03 20:26:10 +02:00

Backup themes during upgrade (#42)

Fix #42
This commit is contained in:
lapineige 2019-06-04 18:45:52 +02:00 committed by GitHub
parent 13aa7fc844
commit 225d5fe51e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,6 +76,8 @@ path_url=$(ynh_normalize_url_path $path_url)
tmpdir="$(ynh_smart_mktemp 600)"
# Backup the config file in the temp dir
cp -a "$final_path/data" "$tmpdir/"
# Backup the theme file in the temp dir
cp -a "$final_path/tpl" "$tmpdir/"
# Remove the app directory securely
ynh_secure_remove "$final_path"
@ -86,8 +88,9 @@ ynh_secure_remove "$final_path"
ynh_print_info "Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path"
cp -a "$tmpdir/data" "${final_path}/"
rm -Rf "$tmpdir"
sudo cp -a "$tmpdir/data" "${final_path}/"
sudo cp -a "$tmpdir/tpl" "${final_path}/"
sudo rm -Rf "$tmpdir"
#=================================================
# NGINX CONFIGURATION