mirror of
https://github.com/YunoHost-Apps/chuwiki_ynh.git
synced 2024-09-03 18:16:18 +02:00
Update upgrade
This commit is contained in:
parent
1d0df36e61
commit
3917d5e6cf
1 changed files with 9 additions and 11 deletions
|
@ -68,10 +68,18 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
ynh_secure_remove --file="$final_path"
|
# Create a temporary directory
|
||||||
|
tmpdir="$(mktemp -d)"
|
||||||
|
cp -a "$final_path/configuration.ini" "$tmpdir/configuration.ini"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
# Copy the admin saved settings from tmp directory to final config path
|
||||||
|
cp -a "$tmpdir/configuration.ini" "$final_path/configuration.ini"
|
||||||
|
# Remove the tmp directory securely
|
||||||
|
ynh_secure_remove --file="$tmpdir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
|
@ -94,16 +102,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ADD A CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|
||||||
|
|
||||||
ynh_add_config --template="../conf/configuration.ini" --destination="$final_path/configuration.ini"
|
|
||||||
|
|
||||||
chmod 400 "$final_path/configuration.ini"
|
|
||||||
chown $app: "$final_path/configuration.ini"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue