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:
parent
b43746d5de
commit
c41b6cc63f
1 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue