Project

General

Profile

Download (1.27 KB) Statistics
| Branch: | Tag: | Revision:

root / bin / postman_daemon @ 44648f83

1
#!/usr/bin/ruby
2

    
3
#--
4
# CyborgHood, a distributed system management software.
5
# Copyright (c) 2009 Marc Dequènes (Duck) <Duck@DuckCorp.org>
6
#
7
# This program is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
#++
20

    
21
# to allow in-place run for test
22
$: << File.join(File.dirname(__FILE__), "..", "lib")
23

    
24
require 'daemons'
25
require 'cyborghood/config_setup'
26

    
27
options = {
28
  :app_name     => "CyborgHood_Postman",
29
  :dir_mode     => :normal,
30
  :dir          => CyborgHood::Config::RUN_DIR,
31
  :multiple     => false,
32
  :mode         => :exec,
33
  :monitor      => true
34
}
35
# deactivated: monitor process not stopped when program is asked to stop
36
#  :backtrace   => true,
37
Daemons.run(File.join(CyborgHood::Config::BIN_DIR, 'postman'), options)
(3-3/3)