Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Commit

Permalink
Updated daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
soulim committed Oct 18, 2010
1 parent 2b30973 commit 22d6006
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
28 changes: 27 additions & 1 deletion script/prism
@@ -1,6 +1,32 @@
#!/usr/bin/env ruby
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'rubygems'
require 'daemons'
require 'yaml'
require 'prism'

Daemons.run('runner', :monitor => true)
Daemons.run_proc('prism', :monitor => true) do
if ARGV.include?('--')
ARGV.slice! 0..ARGV.index('--')
else
ARGV.clear
end

config = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'config', 'prism.yml'))[ARGV.first]

Prism.start do |c|
c.websocket = {
:host => config["websocket"]["host"],
:port => config["websocket"]["port"],
:debug => config["websocket"]["debug"]
}
c.http = {
:host => config["http"]["host"],
:port => config["http"]["port"],
:debug => config["http"]["debug"]
}
c.key = config["key"]
c.secret = config["secret"]
end
end
10 changes: 0 additions & 10 deletions script/runner

This file was deleted.

0 comments on commit 22d6006

Please sign in to comment.