mirror of
https://github.com/YunoHost-Apps/discourse_ynh.git
synced 2024-09-03 18:26:18 +02:00
Keep ldap configuration file on upgrade
This commit is contained in:
parent
d9b554c686
commit
c866841ae0
1 changed files with 4 additions and 1 deletions
|
@ -83,12 +83,15 @@ ynh_setup_source --dest_dir="$install_dir" --full_replace=1 \
|
||||||
--keep="config/discourse.conf plugins_old public/uploads public/backups log"
|
--keep="config/discourse.conf plugins_old public/uploads public/backups log"
|
||||||
|
|
||||||
# Restore all non-core plugins
|
# Restore all non-core plugins
|
||||||
for plugin_dir in "$install_dir/plugins"/*; do
|
for plugin_dir in "$install_dir/plugins_old"/*; do
|
||||||
plugin_name=$(basename "$plugin_dir")
|
plugin_name=$(basename "$plugin_dir")
|
||||||
if [ ! -d "$install_dir/plugins/$plugin_name" ]; then
|
if [ ! -d "$install_dir/plugins/$plugin_name" ]; then
|
||||||
mv "$plugin_dir" "$install_dir/plugins/$plugin_name"
|
mv "$plugin_dir" "$install_dir/plugins/$plugin_name"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
# Also restore ldap configuration file
|
||||||
|
mv "$install_dir/plugins_old/discourse-ldap-auth/conf/settings.yml" "$install_dir/plugins/discourse-ldap-auth/conf/settings.yml"
|
||||||
|
|
||||||
ynh_secure_remove --file="$install_dir/plugins_old"
|
ynh_secure_remove --file="$install_dir/plugins_old"
|
||||||
|
|
||||||
# Install LDAP plugin
|
# Install LDAP plugin
|
||||||
|
|
Loading…
Reference in a new issue