1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2021-04-25 08:47:54 +02:00
parent fbfa00bb9e
commit d480d76839

View file

@ -87,8 +87,20 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Create a temporary directory
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
cp -a "$final_path/config/config.js" "$tmpdir/config.js"
# 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/config.js" "$final_path/config/config.js"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
fi
#=================================================
@ -111,7 +123,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
# CONFIGURE CONFIG.JS
#=================================================
ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js"
#ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js"
#=================================================
# INSTALL CRYPTPAD