<< | Index | >>
doc/index.rbx
)
ydim_config: /path/to/vetoquinol/etc/ydim.yml ydim_id: 68
--- user: ydim-inject private_key: '/home/bbmb/.ssh/id_dsa' (without pass-phrase) server_url: 'druby://xxx.xxx.x.xxx' => # thinpower client_url: 'druby://xxx.xxx.x.xxx' => # fastpower
ydim_config: /var/www/sandoz.bbmb.ch/etc/ydim.yml ydim_id: 51
--- user: ydim-inject private_key: '/home/bbmb/.ssh/id_dsa' (without pass-phrase) server_url: 'druby://xxx.xxx.x.xxx' => # thinpower client_url: 'druby://xxx.xxx.x.xxx' => # fastpower
No Configuration.
bbmb.ch (old interface) uses directly SSH command with /var/www/bbmb.ch/etc/id_dsa
key as ydim-inject
user.
See note below.
xmlconv.yml
must have ydim_id
and ydim_config
in xmlconv.yml
.
But, they don't have ydim_id
in xmlconv.yml.
xmlconv services connect via BBMB.
xmlcovd
and bbmbd
are client.
def ydim_connect(&block) config = YDIM::Client::CONFIG if(path = XmlConv::CONFIG.ydim_config) config.load(path) end server = DRbObject.new(nil, config.server_url) client = YDIM::Client.new(config) # => create client instance (drb) key = OpenSSL::PKey::DSA.new(File.read(config.private_key)) client.login(server, key) block.call(client) ensure client.logout if(client) end
BBMB v1 (alloga.bbmb.ch) uses ssh command directly, like this:
def mail_pdf_bill(billn, time_range, total) config = { 'currency' => 'CHF', 'debitor' => 12, 'description' => billn, 'items' => [ { 'time' => Time.now, 'text' => time_range.first.strftime('Umsatzbeteiligung %m/%Y'), 'unit' => 'Auftrag', 'quantity'=> 1, 'price' => total/1000.0, }, ], } keypath = File.expand_path('../../etc/id_dsa', File.dirname(__FILE__)) target = "ydim-inject@192.168.0.36" command = '/usr/bin/ruby /usr/bin/ydim-inject' IO.popen("ssh -i #{keypath} #{target} #{command}", 'w') { |ch| ch.puts(config.to_yaml) ch.close } end