rdrcollector/rdrcolld

28 lines
968 B
Perl
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/usr/bin/perl
###################################################
# скрипт для запуска rdrcollector-а демоном
#
# Автор: Сергей Калинин e-mail: banzaj28@yandex.ru
# распространяется под лицензией GPL
# (c) 2015
###################################################
use warnings;
use strict;
use Daemon::Control;
use Getopt::Long;
GetOptions(\ my %opt, 'conf=s', 'source-ip=s', 'source-port=s', 'out-dir=s', 'help', 'verbose');
exit Daemon::Control->new(
name => "RDR collector daemon",
path => '/var/cache/rdrcollector',
program => '/usr/local/bin/rdrcollector.pl --conf /usr/local/etc/rdrcollector.conf',
#program_args => [ '--city', $OPT{city} ],
#program_args => ['--source-ip', $opt{'source-ip'}, '--source-port', $opt{'source-port'}, '--out-dir', $opt{'out-dir'}],
pid_file => '/var/run/rdrcollector.pid',
)->run;
#->run_command( 'start' );