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

Don't remove uploads when upgrading, aka move it away from live folder

This commit is contained in:
Augustin Trancart 2023-03-15 20:29:17 +01:00
parent 114cd7c6af
commit 0072bb9473
2 changed files with 6 additions and 2 deletions

View file

@ -93,9 +93,11 @@ ynh_script_progression --message="Setting up source files..." --weight=1
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path/live"
# create upload folder and link it
mkdir $final_path/uploads
ln -s $final_path/uploads $final_path/live/
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chmod -R 750 "$final_path"
chown -R $app:www-data "$final_path"
#=================================================

View file

@ -127,6 +127,8 @@ then
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path/live" --keep="config/diaspora.yml config/database.yml"
ln -s $final_path/uploads $final_path/live/
cp "$tmpdir/diaspora.yml" "$final_path/live/config/diaspora.yml"
cp "$tmpdir/database.yml" "$final_path/live/config/database.yml"
ynh_secure_remove --file="$tmpdir"