Blame view

script/odbcconf 838 Bytes
8808f617   Rodrigo Souto   Chat package
1
2
3
#!/usr/bin/env ruby

require 'yaml'
0a7e61da   Evandro Jr   allows erb templa...
4
require 'erb'
8808f617   Rodrigo Souto   Chat package
5

0a7e61da   Evandro Jr   allows erb templa...
6
config = YAML.load(ERB.new(File.read(File.dirname(__FILE__) + '/../config/database.yml')).result)['production']
8808f617   Rodrigo Souto   Chat package
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

puts "[PostgreSQLEjabberdNoosfero]"
puts "Description      = PostgreSQL Noosfero ejabberd database"
puts "Driver           = PostgreSQL Unicode"
puts "Trace            = No"
puts "TraceFile        = /tmp/psqlodbc.log"
puts "Database         = #{config['database']}"
puts "Servername       = #{config['host'] || 'localhost'}"
puts "UserName         = #{config['username']}"
puts "Password         = #{config['password']}"
puts "Port             = #{config['port'] || '5432'}"
puts "ReadOnly         = No"
puts "RowVersioning    = No"
puts "ShowSystemTables = No"
puts "ShowOidColumn    = No"
puts "FakeOidIndex     = No"
puts "ConnSettings     = SET search_path TO ejabberd"