mirror of
https://github.com/YunoHost-Apps/mastodon_ynh.git
synced 2024-09-03 19:46:02 +02:00
v2
This commit is contained in:
parent
803bb865b9
commit
837f6c56a2
1 changed files with 4 additions and 19 deletions
|
@ -89,28 +89,13 @@ then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download Mastodon
|
# Download Mastodon
|
||||||
tmpdir="$(mktemp -d)"
|
ynh_setup_source --dest_dir="$install_dir/live" --keep="public/system/"
|
||||||
|
|
||||||
mkdir $tmpdir/system
|
chmod 750 "$install_dir"
|
||||||
if [ -d "$install_dir/live/public/system" ]; then
|
chmod -R o-rwx "$install_dir"
|
||||||
mv --verbose --no-target-directory --backup=numbered "$install_dir/live/public/system" "$install_dir/system.tmp"
|
chown -R $app:www-data "$install_dir"
|
||||||
fi
|
|
||||||
rsync -a "$config" "$tmpdir/."
|
|
||||||
ynh_secure_remove --file="$install_dir/live"
|
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir/live"
|
|
||||||
|
|
||||||
if [ -d "$install_dir/system.tmp" ]; then
|
|
||||||
mv --verbose --no-target-directory "$install_dir/system.tmp" "$install_dir/live/public/system"
|
|
||||||
fi
|
|
||||||
rsync -a "$tmpdir/.env.production" "$install_dir/live/."
|
|
||||||
ynh_secure_remove --file="$tmpdir"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
|
||||||
chmod -R o-rwx "$install_dir"
|
|
||||||
chown -R $app:www-data "$install_dir"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue