Allow specifiying storagearea to audit
parent
181a94de82
commit
a67c34fcad
|
@ -67,6 +67,7 @@ my $continuous = 0;
|
||||||
my $monitor_id = 0;
|
my $monitor_id = 0;
|
||||||
my $version;
|
my $version;
|
||||||
my $force = 0;
|
my $force = 0;
|
||||||
|
my $storage_id = undef;
|
||||||
|
|
||||||
logInit();
|
logInit();
|
||||||
|
|
||||||
|
@ -76,6 +77,7 @@ GetOptions(
|
||||||
interactive =>\$interactive,
|
interactive =>\$interactive,
|
||||||
monitor_id =>\$monitor_id,
|
monitor_id =>\$monitor_id,
|
||||||
report =>\$report,
|
report =>\$report,
|
||||||
|
storage_id =>\$storage_id,
|
||||||
version =>\$version
|
version =>\$version
|
||||||
) or pod2usage(-exitstatus => -1);
|
) or pod2usage(-exitstatus => -1);
|
||||||
|
|
||||||
|
@ -194,9 +196,17 @@ MAIN: while( $loop ) {
|
||||||
|
|
||||||
my $fs_monitors;
|
my $fs_monitors;
|
||||||
|
|
||||||
foreach my $Storage (
|
my @Storage_Areas;
|
||||||
ZoneMinder::Storage->find( ($Config{ZM_SERVER_ID} ? ( ServerId => $Config{ZM_SERVER_ID} ) : () ) ),
|
if ( defined $storage_id ) {
|
||||||
) {
|
@Storage_Areas = ZoneMinder::Storage->find( Id=>$storage_id );
|
||||||
|
} elsif ( $Config{ZM_SERVER_ID} ) {
|
||||||
|
@Storage_Areas = ZoneMinder::Storage->find( ServerId => $Config{ZM_SERVER_ID} );
|
||||||
|
} else {
|
||||||
|
@Storage_Areas = ZoneMinder::Storage->find();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach my $Storage ( @Storage_Areas ) {
|
||||||
Debug('Checking events in ' . $Storage->Path() );
|
Debug('Checking events in ' . $Storage->Path() );
|
||||||
if ( ! chdir( $Storage->Path() ) ) {
|
if ( ! chdir( $Storage->Path() ) ) {
|
||||||
Error( 'Unable to change dir to ' . $Storage->Path() );
|
Error( 'Unable to change dir to ' . $Storage->Path() );
|
||||||
|
|
Loading…
Reference in New Issue