28 lines
968 B
Plaintext
28 lines
968 B
Plaintext
|
#!/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' );
|