diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..2c0fefd --- /dev/null +++ b/config.ru @@ -0,0 +1,11 @@ +require 'rubygems' +require 'sinatra' + +Sinatra::Application.default_options.merge!( + :run => false, + :env => :production +) + +require 'binaryattraction_facebooker' +run Sinatra.application + diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..74c7007 --- /dev/null +++ b/config.yml @@ -0,0 +1,14 @@ +--- + environment: production + chdir: /webapp/binaryattraction + address: 127.0.0.1 + user: webapp + group: webapp + port: 12501 + pid: /webapp/binaryattraction/log/sinatra.pid + rackup: /webapp/binaryattraction/config.ru + log: /webapp/binaryattraction/sinatra.log + max_conns: 1024 + timeout: 30 + max_persistent_conns: 512 + daemonize: true diff --git a/facebook_daemon b/facebook_daemon deleted file mode 100755 index 23dcb69..0000000 --- a/facebook_daemon +++ /dev/null @@ -1,15 +0,0 @@ -#!/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)