1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lychee_ynh.git synced 2024-09-03 19:36:36 +02:00
This commit is contained in:
ericgaspar 2021-05-15 13:15:33 +02:00
parent 27f6bd8cf5
commit 5ad6429800
2 changed files with 4 additions and 16 deletions

View file

@ -5,9 +5,9 @@
;; Test complet ;; Test complet
; Manifest ; Manifest
domain="domain.tld" (DOMAIN) domain="domain.tld"
path="/path" (PATH) path="/path"
is_public=1 (PUBLIC|public=1|private=0) is_public=1
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=1 setup_sub_dir=1

View file

@ -85,12 +85,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=4 ynh_script_progression --message="Upgrading source files..." --weight=4
# Create a temporary directory
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
cp -a "$final_path/public/dist/user.css" "$tmpdir/user.css"
if [ "$version" -lt "4.3" ]; then if [ "$version" -lt "4.3" ]; then
mkdir -p $public_path/uploads mkdir -p $public_path/uploads
# Move media to new path # Move media to new path
@ -101,13 +95,7 @@ then
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/public/dist/user.css"
# Copy the admin saved settings from tmp directory to final path
cp -a "$tmpdir/user.css" "$final_path/public/dist/user.css"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
fi fi
#================================================= #=================================================