]> git.openstreetmap.org Git - rails.git/blobdiff - lib/daemons/gpx_import_ctl
add daemons
[rails.git] / lib / daemons / gpx_import_ctl
diff --git a/lib/daemons/gpx_import_ctl b/lib/daemons/gpx_import_ctl
new file mode 100755 (executable)
index 0000000..5730005
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/env ruby
+require 'rubygems'
+require "daemons"
+require 'yaml'
+require 'erb'
+require 'active_support'
+
+options = YAML.load(
+  ERB.new(
+  IO.read(
+  File.dirname(__FILE__) + "/../../config/daemons.yml"
+  )).result).with_indifferent_access
+options[:dir_mode] = options[:dir_mode].to_sym
+
+Daemons.run File.dirname(__FILE__) + '/gpx_import.rb', options
\ No newline at end of file