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

Update upgrade

This commit is contained in:
ericgaspar 2021-10-10 09:16:12 +02:00
parent b43746d5de
commit c41b6cc63f

View file

@ -78,19 +78,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=10
# Create a temporary directory
tmpdir="$(mktemp -d)"
cp -a "$final_path/config/config.json" "$tmpdir/config.json"
# 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
cp -a "$tmpdir/config.json" "$final_path/config/config.json"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
fi
#=================================================
@ -137,6 +129,14 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Modifying a config file..." --weight=2
ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config/config.json"
chmod 600 $final_path/config/config.json
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================