Skip to content

Commit

Permalink
Merge branch 'fix_1762' into storageareas
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Mar 31, 2017
2 parents 514c83d + d3b6792 commit 58d119d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 20 deletions.
5 changes: 5 additions & 0 deletions distros/redhat/systemd/zoneminder.tmpfiles.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
D @ZM_TMPDIR@ 0755 @WEB_USER@ @WEB_GROUP@
D @ZM_TMPDIR@/logs 0755 @WEB_USER@ @WEB_GROUP@
D @ZM_TMPDIR@/cache 0755 @WEB_USER@ @WEB_GROUP@
D @ZM_TMPDIR@/cache/models 0755 @WEB_USER@ @WEB_GROUP@
D @ZM_TMPDIR@/cache/persistent 0755 @WEB_USER@ @WEB_GROUP@
D @ZM_TMPDIR@/cache/views 0755 @WEB_USER@ @WEB_GROUP@
D @ZM_SOCKDIR@ 0755 @WEB_USER@ @WEB_GROUP@
13 changes: 8 additions & 5 deletions distros/redhat/zoneminder.spec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

Name: zoneminder
Version: 1.30.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A camera monitoring and analysis tool
Group: System Environment/Daemons
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
Expand All @@ -39,7 +39,7 @@ Group: System Environment/Daemons
License: GPLv2+ and LGPLv2+ and MIT
URL: http://www.zoneminder.com/

Source0: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source0: https://github.com/ZoneMinder/ZoneMinder/archive/%{version}.tar.gz#/zoneminder-%{version}.tar.gz
Source1: https://github.com/FriendsOfCake/crud/archive/v%{crud_version}.tar.gz#/crud-%{crud_version}.tar.gz

%{?with_init_systemd:BuildRequires: systemd-devel}
Expand Down Expand Up @@ -130,8 +130,8 @@ designed to support as many cameras as you can attach to your computer without
too much degradation of performance.

%prep
%autosetup
%autosetup -a 1
%autosetup -n ZoneMinder-%{version}
%autosetup -a 1 -n ZoneMinder-%{version}
rmdir ./web/api/app/Plugin/Crud
mv -f crud-%{crud_version} ./web/api/app/Plugin/Crud

Expand Down Expand Up @@ -336,8 +336,11 @@ rm -rf %{_docdir}/%{name}-%{version}
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %ghost %{_localstatedir}/run/zoneminder

%changelog
* Thu Mar 30 2017 Andrew Bauer <[email protected]> - 1.30.2-2
- 1.30.2 release

* Wed Feb 08 2017 Andrew Bauer <[email protected]> - 1.30.2-1
- Bump version for 1.30.2 release
- Bump version for 1.30.2 release candidate 1

* Wed Dec 28 2016 Andrew Bauer <[email protected]> - 1.30.1-2
- Changes from rpmfusion #4393
Expand Down
2 changes: 1 addition & 1 deletion misc/zoneminder.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Type=forking
ExecStart=@BINDIR@/zmpkg.pl start
ExecReload=@BINDIR@/zmpkg.pl restart
ExecStop=@BINDIR@/zmpkg.pl stop
PIDFile="@ZM_RUNDIR@/zm.pid"
PIDFile=@ZM_RUNDIR@/zm.pid
Environment=TZ=:/etc/localtime

[Install]
Expand Down
32 changes: 19 additions & 13 deletions scripts/zmdc.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ use ZoneMinder;
use POSIX;
use Socket;
use IO::Handle;
use Time::HiRes qw(usleep);
use autouse 'Pod::Usage'=>qw(pod2usage);
#use Data::Dumper;

Expand Down Expand Up @@ -456,20 +457,25 @@ sub send_stop {
} # end sub send_stop

sub kill_until_dead {
my ( $process ) = @_;
# Now check it has actually gone away, if not kill -9 it
my $count = 0;
while( $process and $$process{pid} and kill( 0, $$process{pid} ) ) {
if ( $count++ > 5 ) {
dPrint( ZoneMinder::Logger::WARNING, "'$$process{command}' has not stopped at "
.strftime( '%y/%m/%d %H:%M:%S', localtime() )
.". Sending KILL to pid $$process{pid}\n"
);
kill( 'KILL', $$process{pid} );
}

sleep( 1 );
my ( $process ) = @_;
# Now check it has actually gone away, if not kill -9 it
my $count = 0;
my $sigset = POSIX::SigSet->new;
my $blockset = POSIX::SigSet->new(SIGINT);
sigprocmask(SIG_BLOCK, $blockset, $sigset ) or die "dying at block...\n";
while( $process and $$process{pid} and kill( 0, $$process{pid} ) ) {
if ( $count++ > 5 ) {
dPrint( ZoneMinder::Logger::WARNING, "'$$process{command}' has not stopped at "
.strftime( '%y/%m/%d %H:%M:%S', localtime() )
.". Sending KILL to pid $$process{pid}\n"
);
kill( 'KILL', $$process{pid} );
}

sigprocmask(SIG_UNBLOCK, $blockset) or die "dying at unblock...\n";
usleep( 1 );
sigprocmask(SIG_BLOCK, $blockset, $sigset ) or die "dying at block...\n";
}
}

sub _stop {
Expand Down
2 changes: 1 addition & 1 deletion web/skins/classic/views/montage.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
$row['Scale'] = $scale;
$row['PopupScale'] = reScale( SCALE_BASE, $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE );

if ( ZM_OPT_CONTROL && $row['ControlId'] )
if ( ZM_OPT_CONTROL && $row['ControlId'] && $row['Controllable'] )
$showControl = true;
$row['connKey'] = generateConnKey();
$monitors[] = new Monitor( $row );
Expand Down

0 comments on commit 58d119d

Please sign in to comment.