Spacing, quotes. Main thing is to delete Object cache on HUP

This commit is contained in:
Isaac Connor 2018-06-21 10:49:51 -04:00
parent 3cb5ef6a94
commit fd72689182
1 changed files with 13 additions and 13 deletions

View File

@ -77,11 +77,11 @@ my $version = 0;
my $zm_terminate = 0;
GetOptions(
'daemon' =>\$daemon,
'filter=s' =>\$filter_name,
'filter_id=s' =>\$filter_id,
'version' =>\$version
) or pod2usage(-exitstatus => -1);
daemon =>\$daemon,
'filter=s' =>\$filter_name,
'filter_id=s' =>\$filter_id,
version =>\$version
) or pod2usage(-exitstatus => -1);
if ( $version ) {
print ZoneMinder::Base::ZM_VERSION . "\n";
@ -98,15 +98,16 @@ use constant EVENT_PATH => ($Config{ZM_DIR_EVENTS}=~m|/|)
logInit($filter_id?(id=>'zmfilter_'.$filter_id):());
sub HupHandler {
Info("Received HUP, reloading");
Info('Received HUP, reloading');
ZoneMinder::Object::init_cache();
&ZoneMinder::Logger::logHupHandler();
}
sub TermHandler {
Info("Received TERM, exiting");
Info('Received TERM, exiting');
$zm_terminate = 1;
}
sub Term {
exit( 0 );
exit(0);
}
$SIG{HUP} = \&HupHandler;
$SIG{TERM} = \&TermHandler;
@ -175,7 +176,7 @@ if ( $filter_name ) {
}
if ( ! ( $filter_name or $filter_id ) ) {
Debug("Sleeping due to start delay: " . START_DELAY . ' seconds...');
Debug('Sleeping due to start delay: ' . START_DELAY . ' seconds...');
sleep(START_DELAY);
}
@ -267,8 +268,7 @@ sub checkFilter {
Info(
join(' ',
'Checking filter', $filter->{Name},
join( ', ',
join(', ',
($filter->{AutoDelete}?'delete':()),
($filter->{AutoArchive}?'archive':()),
($filter->{AutoVideo}?'video':()),
@ -385,7 +385,7 @@ sub generateVideo {
$format = $ffmpeg_formats[0];
}
my $command = join( '',
my $command = join('',
$Config{ZM_PATH_BIN},
'/zmvideo.pl -e ',
$event->{Id},
@ -397,7 +397,7 @@ sub generateVideo {
$format,
);
my $output = qx($command);
chomp( $output );
chomp($output);
my $status = $? >> 8;
if ( $status || logDebugging() ) {
Debug("Output: $output\n");