diff --git a/scripts/upgrade b/scripts/upgrade index e78c066..24c33aa 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #=================================================