]> git.openstreetmap.org Git - rails.git/blob - vendor/generators/daemon/templates/script.rb
Merge branch 'master' into openid
[rails.git] / vendor / generators / daemon / templates / script.rb
1 #!/usr/bin/env ruby
2
3 #You might want to change this
4 ENV["RAILS_ENV"] ||= "production"
5
6 require File.dirname(__FILE__) + "/../../config/environment"
7
8 $running = true;
9 Signal.trap("TERM") do 
10   $running = false
11 end
12
13 while($running) do
14   
15   # Replace this with your code
16   ActiveRecord::Base.logger << "This daemon is still running at #{Time.now}.\n"
17   
18   sleep 10
19 end