1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grocy_ynh.git synced 2024-09-03 19:25:54 +02:00
This commit is contained in:
ericgaspar 2020-12-26 19:05:38 +01:00
parent e3a52e3181
commit 0f421c5145
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 18 additions and 2 deletions

View file

@ -104,6 +104,7 @@ ynh_store_file_checksum --file="$final_path/data/config.php"
# Set permissions to app files
chown -R $app: $final_path
chmod -R 755 $final_path/data
#=================================================
# INTEGRATE SERVICE IN YUNOHOST

View file

@ -77,6 +77,7 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
# Restore permissions on app files
chown -R $app: $final_path
chmod -R 755 $final_path/data
#=================================================
# INTEGRATE SERVICE IN YUNOHOST

View file

@ -62,8 +62,22 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
cp -a "$final_path/data" "$tmpdir/data"
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
# Copy the admin saved settings from tmp directory to final path
cp -a "$tmpdir/data" "$final_path/config/data"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
fi
#=================================================