Merge branch 'master' into storageareas

This commit is contained in:
Isaac Connor 2016-08-17 10:31:55 -04:00
commit eafe3d7748
5 changed files with 19 additions and 10 deletions

View File

@ -97,6 +97,15 @@ New installs
sudo systemctl enable zoneminder
sudo systemctl start zoneminder
9. The Fedora repos have a ZoneMinder package available, but it does not
support ffmpeg or libvlc, which many modern IP cameras require. Most users
will want to prevent the ZoneMinder package in the Fedora repos from
overwriting the ZoneMinder package in zmrepo, during a future dnf update. To
prevent that from happening you must edit /etc/yum.repos.d/fedora.repo
and /etc/yum.repos.d/fedora-updates.repo. Add the line "exclude=zoneminder*"
without the quotes under the [fedora] and [fedora-updates] blocks,
respectively.
Upgrades
========

View File

@ -89,7 +89,7 @@ This API changes monitor 1 to Modect and Enabled
::
curl -XPOST http://server/zm/api/monitors/1.json -d "Monitor[Function]=Modect&Monitor[Enabled]:true"
curl -XPOST http://server/zm/api/monitors/1.json -d "Monitor[Function]=Modect&Monitor[Enabled]=1"
Add a monitor
^^^^^^^^^^^^^^
@ -209,7 +209,7 @@ Return a list of events for a specific monitor Id =5
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
curl -XGET http://server/zm/api/events/events/index/MonitorId:5.json``
curl -XGET http://server/zm/api/events/index/MonitorId:5.json
Note that the same pagination logic applies if the list is too long
@ -220,7 +220,7 @@ Return a list of events for a specific monitor within a specific date/time range
::
http://server/zm/api/events/events/index/MonitorId:5/StartTime >=:2015-05-15 18:43:56/EndTime <=:2015-05-16 18:43:56.json
http://server/zm/api/events/index/MonitorId:5/StartTime >=:2015-05-15 18:43:56/EndTime <=:2015-05-16 18:43:56.json
To try this in CuRL, you need to URL escape the spaces like so:
@ -350,5 +350,5 @@ ZM APIs have various APIs that help you in determining host (aka ZM) daemon stat
curl -XGET http://server/zm/api/host/daemonCheck.json # 1 = ZM running 0=not running
curl -XGET http://server/zm/api/host/getLoad.json # returns current load of ZM
curl -XGET http://server/zm/api/host/getDiskPercent.json # returns in GB (not percentage), disk usage per monitor (that is, space taken to store various event related information,images etc. per monitor) ``
curl -XGET http://server/zm/api/host/getDiskPercent.json # returns in GB (not percentage), disk usage per monitor (that is, space taken to store various event related information,images etc. per monitor)

View File

@ -69,7 +69,7 @@ use IO::Handle;
use autouse 'Pod::Usage'=>qw(pod2usage);
#use Data::Dumper;
use constant SOCK_FILE => $Config{ZM_PATH_SOCKS}.'/zmdc.sock';
use constant SOCK_FILE => $Config{ZM_PATH_SOCKS}.'/zmdc'.($Config{ZM_SERVER_ID}?$Config{ZM_SERVER_ID}:'').'.sock';
$| = 1;

View File

@ -15,7 +15,7 @@ This is still a bit of a work in progress.
2. Build ZoneMinder container
```sudo docker build -t yourname/zoneminder github.com/ZoneMinder/ZoneMinder```
3. Run it
```CID=$(sudo docker run -d -p 222:22 -p 8080:80 -name zoneminder yourname/zoneminder)```
```CID=$(sudo docker run -d -p 222:22 -p 8080:80 --name zoneminder yourname/zoneminder)```
4. Use it -- you can now SSH to port 222 on your host as user root with password root.
You can also browse to your host on port 8080 to access the zoneminder web interface

View File

@ -858,10 +858,10 @@ function zmcControl( $monitor, $mode=false ) {
}
function zmaControl( $monitor, $mode=false ) {
if ( !is_array( $monitor ) ) {
$monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) );
}
if ( (!defined('ZM_SERVER_ID')) or ( ZM_SERVER_ID==$monitor['ServerId'] ) ) {
if ( !is_array( $monitor ) ) {
$monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) );
}
if ( !$monitor || $monitor['Function'] == 'None' || $monitor['Function'] == 'Monitor' || $mode == "stop" ) {
if ( ZM_OPT_CONTROL ) {
daemonControl( "stop", "zmtrack.pl", "-m ".$monitor['Id'] );
@ -891,7 +891,7 @@ function zmaControl( $monitor, $mode=false ) {
daemonControl( "reload", "zma", "-m ".$monitor['Id'] );
}
}
}
} // end if we are on the recording server
}
function initDaemonStatus() {