Sha256: 6474806faedf8fcecc3a473c5e929d1abaa5ad69c1d3f2332ef7be3a03cb5eda
Contents?: true
Size: 632 Bytes
Versions: 13
Compression:
Stored size: 632 Bytes
Contents
#!/usr/bin/env ruby require 'erb' require 'fileutils' FileUtils.chdir(File.dirname(__FILE__)) ## For OSX: ENV['PATH'] = "#{ENV['PATH']}:/usr/libexec" template = File.read('slapd-test.conf.erb') normal_out = 'slapd-test.conf' ssl_out = 'slapd-ssl-test.conf' File.open(normal_out, 'w') do |f| @ssl = false f.write ERB.new(template).result(binding) end File.open(ssl_out, 'w') do |f| @ssl = true f.write ERB.new(template).result(binding) end if ARGV.first == '--ssl' cmd = "slapd -d 1 -f #{ssl_out} -h ldaps://localhost:3389" else cmd = "slapd -d 1 -f #{normal_out} -h ldap://localhost:3389" end puts(cmd) exec(cmd)
Version data entries
13 entries across 13 versions & 4 rubygems