allow interactive=0 and use Inf for log lines about resurecting events
This commit is contained in:
parent
181a8c29e1
commit
f86ed5c66c
|
@ -46,7 +46,7 @@ logInit();
|
||||||
|
|
||||||
GetOptions(
|
GetOptions(
|
||||||
force =>\$force,
|
force =>\$force,
|
||||||
interactive =>\$interactive,
|
'interactive=i' =>\$interactive,
|
||||||
'monitor_id=i' =>\$monitor_id,
|
'monitor_id=i' =>\$monitor_id,
|
||||||
report =>\$report,
|
report =>\$report,
|
||||||
'server_id=i' =>\$server_id,
|
'server_id=i' =>\$server_id,
|
||||||
|
@ -233,7 +233,7 @@ Debug("@Monitors");
|
||||||
$Event->recover_timestamps();
|
$Event->recover_timestamps();
|
||||||
|
|
||||||
$Event->save({}, 1);
|
$Event->save({}, 1);
|
||||||
Debug("Event resurrected as " . $Event->to_string() );
|
Info("Event resurrected as " . $Event->to_string() );
|
||||||
next;
|
next;
|
||||||
} # end if resurrection
|
} # end if resurrection
|
||||||
} # event path exists
|
} # event path exists
|
||||||
|
@ -340,7 +340,7 @@ Debug("@Monitors");
|
||||||
$Event = new ZoneMinder::Event();
|
$Event = new ZoneMinder::Event();
|
||||||
$$Event{Id} = $event_id;
|
$$Event{Id} = $event_id;
|
||||||
$$Event{Path} = join('/', $Storage->Path(), $event_dir );
|
$$Event{Path} = join('/', $Storage->Path(), $event_dir );
|
||||||
Debug("Have event $$Event{Id} at $$Event{Path}");
|
Info("Have event $$Event{Id} at $$Event{Path}");
|
||||||
if ( confirm() ) {
|
if ( confirm() ) {
|
||||||
$$Event{Scheme} = 'Medium';
|
$$Event{Scheme} = 'Medium';
|
||||||
$$Event{RelativePath} = $event_dir;
|
$$Event{RelativePath} = $event_dir;
|
||||||
|
@ -352,7 +352,7 @@ Debug("@Monitors");
|
||||||
$Event->StorageId( $Storage->Id() );
|
$Event->StorageId( $Storage->Id() );
|
||||||
$Event->recover_timestamps();
|
$Event->recover_timestamps();
|
||||||
$Event->save({}, 1);
|
$Event->save({}, 1);
|
||||||
Debug("Event resurrected as " . $Event->to_string() );
|
Info("Event resurrected as " . $Event->to_string() );
|
||||||
}
|
}
|
||||||
} # end foreach event
|
} # end foreach event
|
||||||
} # end search for Medium
|
} # end search for Medium
|
||||||
|
@ -377,7 +377,7 @@ Debug("@Monitors");
|
||||||
}
|
}
|
||||||
$$Event{Id} = $event;
|
$$Event{Id} = $event;
|
||||||
$$Event{Path} = join('/', $Storage->Path(), $event );
|
$$Event{Path} = join('/', $Storage->Path(), $event );
|
||||||
Debug("Have event $$Event{Id} at $$Event{Path}");
|
Info("Have event $$Event{Id} at $$Event{Path}");
|
||||||
if ( confirm() ) {
|
if ( confirm() ) {
|
||||||
$$Event{Scheme} = 'Shallow';
|
$$Event{Scheme} = 'Shallow';
|
||||||
$$Event{Name} = "Event $event recovered";
|
$$Event{Name} = "Event $event recovered";
|
||||||
|
|
Loading…
Reference in New Issue