1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

Merge pull request #325 from YunoHost-Apps/fix-plugins-after-upgrade

scripts: restore local plugins after upgrade
This commit is contained in:
Pierre de La Morinerie 2021-12-27 14:35:40 +01:00 committed by GitHub
commit 273dc5e9cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,8 +126,9 @@ then
# Create a temporary directory
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
# Backup the config file and local plugins in the temp dir
cp -a "$final_path/config/config.json" "$tmpdir/config.json"
cp -ar "$final_path/plugins" "$tmpdir/plugins"
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
@ -138,8 +139,9 @@ then
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
fi
# Copy the admin saved settings from tmp directory to final path
# Copy the admin saved settings and plugins from tmp directory to final path
cp -a "$tmpdir/config.json" "$final_path/config/config.json"
cp -ar --no-clobber "$tmpdir/plugins" "$final_path/"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"