]> git.openstreetmap.org Git - rails.git/blob - lib/daemons/gpx_import_ctl
Adds rail
[rails.git] / lib / daemons / gpx_import_ctl
1 #!/usr/bin/env ruby
2 require "rubygems"
3 require "daemons"
4 require "yaml"
5 require "erb"
6
7 class Hash
8   def with_symbols!
9     keys.each { |key| self[key.to_s.to_sym] = self[key] }
10     self
11   end
12 end
13
14 options = YAML.load(
15   ERB.new(
16     IO.read(
17       File.dirname(__FILE__) + "/../../config/daemons.yml"
18     )).result).with_symbols!
19 options[:dir_mode] = options[:dir_mode].to_sym
20
21 Daemons.run File.dirname(__FILE__) + "/gpx_import.rb", options