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

[enh] during 'upgrade', copy LDAP config

See https://github.com/YunoHost-Apps/dokuwiki_ynh/pull/37#discussion_r200142881
This commit is contained in:
Gofannon 2018-07-07 18:24:51 +02:00
parent c78b5c966a
commit 196af58477

View file

@ -196,16 +196,26 @@ done
#=================================================
#=================================================
# LDAP Configuration
#=================================================
# Verify if existing file needs to be upgraded by comparing it's size to new file from package
# If different, do a backup of existing file and overwrite with new file
#
#
# Safe here as this file is only used by Yunohost. Dokuwiki cannot modified it.
ynh_backup_if_checksum_is_different "$final_path/conf/local.protected.php"
# Set the "admin" user
ynh_replace_string "__YNH_ADMIN_USER__" "$admin" "../conf/local.protected.php"
cp ../conf/local.protected.php $final_path/conf
# This File cannot be modified directly by Dokuwiki, only by hand or by Yunohost
# It will only be updated by Yunohost package or directly by adventurous users
# Recalculate and store the config file checksum into the app settings
ynh_store_file_checksum "$final_path/conf/local.protected.php"
#=================================================
# GENERIC FINALIZATION
#=================================================