Project

General

Profile

Download (1.27 KB) Statistics
| Branch: | Tag: | Revision:
2f325370 Marc Dequenes
#!/usr/bin/ruby

d32ee48a Marc Dequenes
#--
# CyborgHood, a distributed system management software.
# Copyright (c) 2009 Marc Dequènes (Duck) <Duck@DuckCorp.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#++
2f325370 Marc Dequenes
d4b5798a Marc Dequènes (Duck)
# to allow in-place run for test
$: << File.join(File.dirname(__FILE__), "..", "lib")

d32ee48a Marc Dequenes
require 'daemons'
44648f83 Marc Dequènes (Duck)
require 'cyborghood/config_setup'
2f325370 Marc Dequenes
options = {
:app_name => "CyborgHood_Postman",
:dir_mode => :normal,
d4b5798a Marc Dequènes (Duck)
:dir => CyborgHood::Config::RUN_DIR,
2f325370 Marc Dequenes
:multiple => false,
:mode => :exec,
:monitor => true
}
# deactivated: monitor process not stopped when program is asked to stop
# :backtrace => true,
d4b5798a Marc Dequènes (Duck)
Daemons.run(File.join(CyborgHood::Config::BIN_DIR, 'postman'), options)