| b004c6b by Marius Mathiesen at 2009-04-22 |
1 |
#!/usr/bin/env ruby |
| 5096af2 by Johan Sørensen at 2009-05-29 |
2 |
# encoding: utf-8 |
|
3 |
|
|
4 |
if RUBY_VERSION < '1.9' |
|
5 |
$KCODE = 'u' |
|
6 |
else |
|
7 |
Encoding.default_internal = Encoding::UTF_8 |
|
8 |
Encoding.default_external = Encoding::UTF_8 |
|
9 |
end |
|
10 |
|
| 809bf16 by Johan Sørensen at 2009-04-22 |
11 |
require 'rubygems' if RUBY_VERSION < '1.9' |
| b004c6b by Marius Mathiesen at 2009-04-22 |
12 |
require 'daemons' |
|
13 |
|
|
14 |
APP_ROOT = File.expand_path(File.dirname(__FILE__) + '/..') |
|
15 |
script_file = File.join(File.expand_path(APP_ROOT),'vendor','plugins','activemessaging','poller.rb') |
| 54f8079 by Johan Sørensen at 2009-05-15 |
16 |
tmp_dir = File.join(File.expand_path(APP_ROOT), 'tmp/pids') |
| b004c6b by Marius Mathiesen at 2009-04-22 |
17 |
|
|
18 |
options = { |
|
19 |
:app_name => "poller", |
|
20 |
:dir_mode => :normal, |
|
21 |
:dir => tmp_dir, |
|
22 |
:multiple => true, |
|
23 |
:ontop => false, |
|
24 |
:mode => :load, |
|
25 |
:backtrace => true, |
| ab12731 by Johan Sørensen at 2009-05-15 |
26 |
:monitor => false, |
| b004c6b by Marius Mathiesen at 2009-04-22 |
27 |
:log_output => true |
|
28 |
} |
|
29 |
|
|
30 |
Daemons.run(script_file,options) |