use ruby daemons instead of rack to control facebook application

master
Coleman 2008-11-23 13:56:17 -06:00
parent c58e109105
commit 90856da2e8
2 changed files with 15 additions and 10 deletions

View File

@ -1,10 +0,0 @@
require 'rubygems'
require 'sinatra'
Sinatra::Application.default_options.merge!(
:run => false,
:env => :production
)
require 'binaryattraction_facebooker'
run Sinatra.application

15
facebook_daemon.rb Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'daemons'
opts = {
:app_name => 'binaryattraction_facebooker',
:dir_mode => :script,
:dir => '/log',
:backtrace => true,
:multiple => true,
:log_output => true
}
Daemons.run(File.dirname(__FILE__) + '/binaryattraction_facebooker.rb', opts)