Revision 849a61fb
Added by Marc Dequènes almost 14 years ago
- ID 849a61fbc6316122e796c45804ce367dfe50f3dd
bin/postman | ||
---|---|---|
end
|
||
end
|
||
|
||
# setup LDAP
|
||
ldap_config = @config.ldap.marshal_dump
|
||
ldap_config[:logger] = logger
|
||
begin
|
||
ActiveLdap::Base.setup_connection(ldap_config)
|
||
# force testing a connection NOW (by default ActiveLdap is doing lazy connections)
|
||
# (the loaded schema will be useful soon anyway)
|
||
# it also tests search parameters (provided to setup_connection)
|
||
ActiveLdap::Base.find(:first)
|
||
rescue
|
||
logger.fatal "LDAP failure: " + $!
|
||
exit 1
|
||
end
|
||
|
||
@imap = IMAP.new(@config.imap, @config.imap.min_check_interval)
|
||
|
||
logger.info "Bot '#{self.human_name}' loaded"
|
Also available in: Unified diff
[evol] Librarian API work §1, using DI too