1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grocy_ynh.git synced 2024-09-03 19:25:54 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2020-12-26 19:12:19 +01:00
parent c899441995
commit ea59adff9f
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -62,6 +62,15 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=5
if [[ ! -f "$final_path/data" ]]; then
# config.ini.php is only created during the post-install process...
# it is therefore not present when the CI tests are carried out...
# This condition is only for CI test to go through the upgrade process
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
else
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
@ -110,14 +119,7 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
# Set permissions to app files
chown -R $app: $final_path
#=================================================
# MODIFY A CONFIG FILE
#=================================================
cp -a ../conf/config-dist.php "$final_path/config-dist.php"
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/data/config.php"
chmod -R 755 $final_path/data
#=================================================
# INTEGRATE SERVICE IN YUNOHOST