This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new c7b95120 Move ldap.txt to running container
c7b95120 is described below

commit c7b9512044da4fe2b25706b19c5dbe6ef2cd9307
Author: Sebb <[email protected]>
AuthorDate: Thu Jan 5 13:30:30 2023 +0000

    Move ldap.txt to running container
---
 Rakefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Rakefile b/Rakefile
index 05a2bb12..23dc67a8 100644
--- a/Rakefile
+++ b/Rakefile
@@ -425,8 +425,11 @@ end
 
 # Set up LDAP items in container context
 def ldap_setup
-  FileUtils.cp LDAP_WHIMSY_PATH, '/srv/ldap.txt'
+  # Link to file in running container
+  FileUtils.cp LDAP_WHIMSY_PATH, '/tmp/ldap.tmp'
   FileUtils.rm_f LDAP_WHIMSY_PATH # remove work file
+  FileUtils.chown 'www-data', 'www-data', '/tmp/ldap.tmp'
+  ln_sf '/tmp/ldap.tmp', '/srv/ldap.txt'
 
   ldapbinddn = ldapbindpw = nil
   File.open(LDAP_HTTPD_PATH, 'r') do |r|
@@ -441,7 +444,7 @@ def ldap_setup
   raise "ERROR: Must define :ldap in ../.whimsy" unless hosts
 
   ldaphosts = hosts.join(" ").gsub('ldaps://', '')
-  
+
   filter('docker-config/whimsy.conf',
     '/etc/apache2/sites-enabled/000-default.conf', ldaphosts, ldapbinddn, 
ldapbindpw)
   filter('docker-config/25-authz_ldap_group_membership.conf',

Reply via email to