use ruby daemons instead of rack to control facebook application
parent
c58e109105
commit
90856da2e8
10
facebook.ru
10
facebook.ru
|
@ -1,10 +0,0 @@
|
||||||
require 'rubygems'
|
|
||||||
require 'sinatra'
|
|
||||||
|
|
||||||
Sinatra::Application.default_options.merge!(
|
|
||||||
:run => false,
|
|
||||||
:env => :production
|
|
||||||
)
|
|
||||||
|
|
||||||
require 'binaryattraction_facebooker'
|
|
||||||
run Sinatra.application
|
|
|
@ -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)
|
Reference in New Issue