Armadito-Agent

 view release on metacpan or  search on metacpan

bin/armadito-agent  view on Meta::CPAN

#!/usr/bin/perl

use strict;
use warnings;
use lib './lib';

use English qw(-no_match_vars);
use Getopt::Long;
use Pod::Usage;
use UNIVERSAL::require;
use IPC::System::Simple qw(capture);
use Data::Dumper;
use Try::Tiny;
use Cwd 'abs_path';

BEGIN {
	if ($OSNAME eq 'MSWin32'){
		use lib "../lib";
	}
}

use Armadito::Agent;

our $VERSION = 0.1;

my $options = {};

if( !$ARGV[0] ){ pod2usage(-verbose => 0, -exitstatus => 0) }

GetOptions(
    $options,
    'get-agentid',
    'get-schedulerid',
    'server|s=s',
    'task|t=s',
    'antivirus|av=s',
    'conf-file=s',
    'conf-reload-interval=i',
    'config=s',
    'setup',
    'key|k=s',
    'wait|w=i',
    'wait-rand|wr=i',
    'list-tasks',
    'list-avs',
    'ca-cert-dir=s',
    'ca-cert-file=s',
    'no-ssl-check',
    'proxy|P=s',
    'user|u=s',
    'password|p=s',
    'timeout=i',
    'help|h',
    'version|v',
    'debug|d=i',
) or pod2usage(-verbose => 0);

if( $options->{help} ){ pod2usage(-verbose => 0, -exitstatus => 0) }

if ($options->{version}) {
    print "armadito-agent $Armadito::Agent::VERSION\n";
    exit 0;
}

my $prefix = ".\/";
if($OSNAME eq "MSWin32"){
	$prefix  = abs_path($0);
	$prefix  =~ s/(.*\/)bin\/armadito-agent.*$/$1/;
}

my %setup = (
    confdir => $prefix.'etc/',
    datadir => $prefix.'share/',



( run in 2.226 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )