27 lines
569 B
Perl
Executable File
27 lines
569 B
Perl
Executable File
#!/usr/bin/perl -T
|
|
use warnings;
|
|
use strict;
|
|
use Simba::CA;
|
|
use POSIX qw(strftime);
|
|
use Getopt::Long;
|
|
|
|
my @filesets;
|
|
|
|
GetOptions('filesets=i' => \@filesets);
|
|
@filesets = split(/,/,join(',',@filesets));
|
|
|
|
$ENV{PATH} = "/usr/bin";
|
|
|
|
my $now = strftime('%Y-%m-%dT%H:%M:%S', localtime());
|
|
open(my $log, '>>', '/var/log/simba/ca.log.' . $now);
|
|
$log->autoflush(1);
|
|
|
|
my $ca = Simba::CA->new({
|
|
dbi_file => $ENV{SIMBA_DB_CONN} || "$ENV{HOME}/.dbi/simba",
|
|
fh_log => $log,
|
|
(@filesets ? ( filesets => \@filesets ) : ()),
|
|
});
|
|
$ca->log_level(9);
|
|
|
|
$ca->run();
|