Merge branch 'master' into zma_to_thread

This commit is contained in:
Isaac Connor 2020-07-21 17:38:32 -04:00
commit 7575afc8d5
210 changed files with 3521 additions and 4636 deletions

View File

@ -65,6 +65,8 @@ set(CMAKE_C_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
set(CMAKE_C_FLAGS_DEBUG "-Wall -D__STDC_CONSTANT_MACROS -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -D__STDC_CONSTANT_MACROS -g")
set(CMAKE_C_FLAGS_OPTIMISED "-Wall -D__STDC_CONSTANT_MACROS -O3")
set(CMAKE_CXX_FLAGS_OPTIMISED "-Wall -D__STDC_CONSTANT_MACROS -O3")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set (CMAKE_CXX_STANDARD 11)
@ -189,6 +191,8 @@ set(ZM_NO_MMAP "OFF" CACHE BOOL
experience problems with the shared memory. default: OFF")
set(ZM_NO_LIBVLC "OFF" CACHE BOOL
"Set to ON to skip libvlc checks and force building ZM without libvlc. default: OFF")
set(ZM_NO_LIBVNC "OFF" CACHE BOOL
"Set to ON to skip libvnc checks and force building ZM without libvnc. default: OFF")
set(ZM_NO_CURL "OFF" CACHE BOOL
"Set to ON to skip cURL checks and force building ZM without cURL. default: OFF")
set(ZM_NO_X10 "OFF" CACHE BOOL
@ -321,7 +325,7 @@ if(NOT ZM_NO_CURL)
find_package(CURL)
if(CURL_FOUND)
set(HAVE_LIBCURL 1)
list(APPEND ZM_BIN_LIBS ${CURL_LIBRARIES})
#list(APPEND ZM_BIN_LIBS ${CURL_LIBRARIES})
include_directories(${CURL_INCLUDE_DIRS})
set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
check_include_file("curl/curl.h" HAVE_CURL_CURL_H)
@ -349,19 +353,50 @@ else(JPEG_FOUND)
"ZoneMinder requires jpeg but it was not found on your system")
endif(JPEG_FOUND)
# LIBJWT
find_package(LibJWT)
if(LIBJWT_FOUND)
set(HAVE_LIBJWT 1)
set(optlibsfound "${optlibsfound} LIBJWT")
list(APPEND ZM_BIN_LIBS "${LIBJWT_LIBRARY}")
else(LIBJWT_FOUND)
set(optlibsnotfound "${optlibsnotfound} LIBJWT")
endif(LIBJWT_FOUND)
# gnutls (using find_library and find_path)
if(HAVE_LIBJWT)
find_library(GNUTLS_LIBRARIES gnutls)
if(GNUTLS_LIBRARIES)
set(HAVE_LIBGNUTLS 1)
list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}")
find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h)
if(GNUTLS_INCLUDE_DIR)
include_directories("${GNUTLS_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
endif(GNUTLS_INCLUDE_DIR)
mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR)
check_include_file("gnutls/gnutls.h" HAVE_GNUTLS_GNUTLS_H)
set(optlibsfound "${optlibsfound} GnuTLS")
else(GNUTLS_LIBRARIES)
set(optlibsnotfound "${optlibsnotfound} GnuTLS")
endif(GNUTLS_LIBRARIES)
endif(HAVE_LIBJWT)
# OpenSSL
find_package(OpenSSL)
if(OPENSSL_FOUND)
set(HAVE_LIBOPENSSL 1)
set(HAVE_LIBCRYPTO 1)
list(APPEND ZM_BIN_LIBS "${OPENSSL_LIBRARIES}")
include_directories("${OPENSSL_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H)
set(optlibsfound "${optlibsfound} OpenSSL")
else(OPENSSL_FOUND)
set(optlibsnotfound "${optlibsnotfound} OpenSSL")
endif(OPENSSL_FOUND)
if(NOT HAVE_LIBGNUTLS OR NOT HAVE_LIBJWT)
find_package(OpenSSL)
if(OPENSSL_FOUND)
set(HAVE_LIBOPENSSL 1)
set(HAVE_LIBCRYPTO 1)
list(APPEND ZM_BIN_LIBS "${OPENSSL_LIBRARIES}")
include_directories("${OPENSSL_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H)
set(optlibsfound "${optlibsfound} OpenSSL")
else(OPENSSL_FOUND)
set(optlibsnotfound "${optlibsnotfound} OpenSSL")
endif(OPENSSL_FOUND)
endif(NOT HAVE_LIBGNUTLS OR NOT HAVE_LIBJWT)
# pthread (using find_library and find_path)
find_library(PTHREAD_LIBRARIES pthread)
@ -418,28 +453,6 @@ else(GCRYPT_LIBRARIES)
set(optlibsnotfound "${optlibsnotfound} GCrypt")
endif(GCRYPT_LIBRARIES)
# gnutls (using find_library and find_path)
find_library(GNUTLS_LIBRARIES gnutls-openssl)
if(NOT GNUTLS_LIBRARIES)
find_library(GNUTLS_LIBRARIES gnutls)
endif(NOT GNUTLS_LIBRARIES)
if(GNUTLS_LIBRARIES)
set(HAVE_LIBGNUTLS 1)
list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}")
find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h)
if(GNUTLS_INCLUDE_DIR)
include_directories("${GNUTLS_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
endif(GNUTLS_INCLUDE_DIR)
mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR)
check_include_file("gnutls/openssl.h" HAVE_GNUTLS_OPENSSL_H)
check_include_file("gnutls/gnutls.h" HAVE_GNUTLS_GNUTLS_H)
set(optlibsfound "${optlibsfound} GnuTLS")
else(GNUTLS_LIBRARIES)
set(optlibsnotfound "${optlibsnotfound} GnuTLS")
endif(GNUTLS_LIBRARIES)
# mysqlclient (using find_library and find_path)
find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
if(MYSQLCLIENT_LIBRARIES)
@ -655,7 +668,7 @@ if(NOT ZM_NO_LIBVLC)
find_library(LIBVLC_LIBRARIES vlc)
if(LIBVLC_LIBRARIES)
set(HAVE_LIBVLC 1)
list(APPEND ZM_BIN_LIBS "${LIBVLC_LIBRARIES}")
#list(APPEND ZM_BIN_LIBS "${LIBVLC_LIBRARIES}")
find_path(LIBVLC_INCLUDE_DIR "vlc/vlc.h")
if(LIBVLC_INCLUDE_DIR)
include_directories("${LIBVLC_INCLUDE_DIR}")
@ -669,6 +682,25 @@ if(NOT ZM_NO_LIBVLC)
endif(LIBVLC_LIBRARIES)
endif(NOT ZM_NO_LIBVLC)
if(NOT ZM_NO_LIBVNC)
# libvncclient (using find_library and find_path)
find_library(LIBVNC_LIBRARIES vncclient)
if(LIBVNC_LIBRARIES)
set(HAVE_LIBVNC 1)
#list(APPEND ZM_BIN_LIBS "${LIBVNC_LIBRARIES}")
find_path(LIBVNC_INCLUDE_DIR "rfb/rfb.h")
if(LIBVNC_INCLUDE_DIR)
include_directories("${LIBVNC_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${LIBVNC_INCLUDE_DIR}")
endif(LIBVNC_INCLUDE_DIR)
mark_as_advanced(FORCE LIBVNC_LIBRARIES LIBVNC_INCLUDE_DIR)
check_include_file("rfb/rfb.h" HAVE_RFB_RFB_H)
set(optlibsfound "${optlibsfound} libVNC")
else(LIBVNC_LIBRARIES)
set(optlibsnotfound "${optlibsnotfound} libVNC")
endif(LIBVNC_LIBRARIES)
endif(NOT ZM_NO_LIBVNC)
#find_package(Boost 1.36.0)
#if(Boost_FOUND)
#include_directories(${Boost_INCLUDE_DIRS})
@ -734,14 +766,7 @@ if(HAVE_OPENSSL_MD5_H)
"unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md)" "NULL" "openssl/md5.h"
HAVE_MD5_OPENSSL)
endif(HAVE_OPENSSL_MD5_H)
if(HAVE_GNUTLS_OPENSSL_H)
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
check_prototype_definition(
MD5
"unsigned char *MD5 (const unsigned char *buf, unsigned long len, unsigned char *md)" "NULL" "gnutls/openssl.h"
HAVE_MD5_GNUTLS)
endif(HAVE_GNUTLS_OPENSSL_H)
if(HAVE_GNUTLS_GNUTLS_H)
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
@ -750,13 +775,17 @@ if(HAVE_GNUTLS_GNUTLS_H)
"int gnutls_fingerprint (gnutls_digest_algorithm_t algo, const gnutls_datum_t * data, void *result, size_t * result_size)" "0" "stdlib.h;gnutls/gnutls.h"
HAVE_DECL_GNUTLS_FINGERPRINT)
endif(HAVE_GNUTLS_GNUTLS_H)
if(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
if(NOT HAVE_DECL_GNUTLS_FINGERPRINT AND HAVE_MD5_OPENSSL)
set(HAVE_DECL_MD5 1)
else(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
endif(NOT HAVE_DECL_GNUTLS_FINGERPRINT AND HAVE_MD5_OPENSSL)
if((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT))
message(AUTHOR_WARNING
"ZoneMinder requires a working MD5 function for hashed authenication but
none were found - hashed authenication will not be available")
endif(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
"ZoneMinder requires a working MD5 function for hashed authentication but
none were found - hashed authentication will not be available")
endif((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT))
# Dirty fix for zm_user only using openssl's md5 if gnutls and gcrypt are not available.
# This needs to be fixed in zm_user.[h,cpp] but such fix will also require changes to configure.ac
if(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL)

View File

@ -22,12 +22,6 @@ https://github.com/ZoneMinder/zmdockerfiles
## Installation Methods
### Building from Source is Discouraged
Historically, installing ZoneMinder onto your system required building from source code by issuing the traditional configure, make, make install commands. To get ZoneMinder to build, all of its dependencies had to be determined and installed beforehand. Init and logrotate scripts had to be manually copied into place following the build. Optional packages such as jscalendar and Cambozola had to be manually installed. Uninstalls could leave stale files around, which could cause problems during an upgrade. Speaking of upgrades, when it comes time to upgrade all these manual steps must be repeated again.
Better methods exist today that do much of this for you. The current development team, along with other volunteers, have taken great strides in providing the resources necessary to avoid building from source.
### Install from a Package Repository
This is the recommended method to install ZoneMinder onto your system. ZoneMinder packages are maintained for the following distros:
@ -43,6 +37,13 @@ This is the recommended method to install ZoneMinder onto your system. ZoneMinde
If a repository that hosts ZoneMinder packages is not available for your distro, then you are encouraged to build your own package, rather than build from source. While each distro is different in ways that set it apart from all the others, they are often similar enough to allow you to adapt another distro's package building instructions to your own.
### Building from Source is Discouraged
Historically, installing ZoneMinder onto your system required building from source code by issuing the traditional configure, make, make install commands. To get ZoneMinder to build, all of its dependencies had to be determined and installed beforehand. Init and logrotate scripts had to be manually copied into place following the build. Optional packages such as jscalendar and Cambozola had to be manually installed. Uninstalls could leave stale files around, which could cause problems during an upgrade. Speaking of upgrades, when it comes time to upgrade all these manual steps must be repeated again.
Better methods exist today that do much of this for you. The current development team, along with other volunteers, have taken great strides in providing the resources necessary to avoid building from source.
### Building a ZoneMinder Package ###
Building ZoneMinder into a package is not any harder than building from source. As a matter of fact, if you have successfully built ZoneMinder from source in the past, then you may find these steps to be easier.

View File

@ -0,0 +1,28 @@
include(FindPackageHandleStandardArgs)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBJWT QUIET libjwt)
find_path(LIBJWT_INCLUDE_DIR
NAMES jwt.h
HINTS ${PC_LIBJWT_INCLUDEDIR} ${PC_LIBJWT_INCLUDE_DIRS}
)
find_library(LIBJWT_LIBRARY
NAMES jwt-gnutls libjwt-gnutls liblibjwt-gnutls
HINTS ${PC_LIBJWT_LIBDIR} ${PC_LIBJWT_LIBRARY_DIR}
)
find_package_handle_standard_args(LibJWT
REQUIRED_VARS LIBJWT_INCLUDE_DIR LIBJWT_LIBRARY
)
if(LIBJWT_FOUND)
add_library(libjwt STATIC IMPORTED GLOBAL)
set_target_properties(libjwt PROPERTIES
IMPORTED_LOCATION "${LIBJWT_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBJWT_INCLUDE_DIR}"
)
endif()
mark_as_advanced(LIBJWT_INCLUDE_DIR LIBJWT_LIBRARY)

View File

@ -63,7 +63,7 @@ DROP TABLE IF EXISTS `Controls`;
CREATE TABLE `Controls` (
`Id` int(10) unsigned NOT NULL auto_increment,
`Name` varchar(64) NOT NULL default '',
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket') NOT NULL default 'Local',
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') NOT NULL default 'Local',
`Protocol` varchar(64) default NULL,
`CanWake` tinyint(3) unsigned NOT NULL default '0',
`CanSleep` tinyint(3) unsigned NOT NULL default '0',
@ -406,7 +406,7 @@ DROP TABLE IF EXISTS `MonitorPresets`;
CREATE TABLE `MonitorPresets` (
`Id` int(10) unsigned NOT NULL auto_increment,
`Name` varchar(64) NOT NULL default '',
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket') NOT NULL default 'Local',
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') NOT NULL default 'Local',
`Device` tinytext,
`Channel` tinyint(3) unsigned default NULL,
`Format` int(10) unsigned default NULL,
@ -440,7 +440,7 @@ CREATE TABLE `Monitors` (
`Notes` TEXT,
`ServerId` int(10) unsigned,
`StorageId` smallint(5) unsigned default 0,
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket') NOT NULL default 'Local',
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') NOT NULL default 'Local',
`Function` enum('None','Monitor','Modect','Record','Mocord','Nodect') NOT NULL default 'Monitor',
`Enabled` tinyint(3) unsigned NOT NULL default '1',
`LinkedMonitors` varchar(255),
@ -734,13 +734,14 @@ CREATE TABLE `Storage` (
`Scheme` enum('Deep','Medium','Shallow') NOT NULL default 'Medium',
`ServerId` int(10) unsigned,
`DoDelete` BOOLEAN NOT NULL DEFAULT true,
`Enabled` BOOLEAN NOT NULL DEFAULT true,
PRIMARY KEY (`Id`)
) ENGINE=@ZM_MYSQL_ENGINE@;
--
-- Create a default storage location
--
insert into Storage VALUES (NULL, '@ZM_DIR_EVENTS@', 'Default', 'local', NULL, NULL, 'Medium', 0, true );
insert into Storage VALUES (NULL, '@ZM_DIR_EVENTS@', 'Default', 'local', NULL, NULL, 'Medium', 0, true, true );
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;

5
db/zm_update-1.34.6.sql Normal file
View File

@ -0,0 +1,5 @@
--
-- This updates a 1.34.5 database to 1.34.6
--
-- No changes required
--

5
db/zm_update-1.34.7.sql Normal file
View File

@ -0,0 +1,5 @@
--
-- This updates a 1.34.6 database to 1.34.7
--
-- No changes required
--

12
db/zm_update-1.35.1.sql Normal file
View File

@ -0,0 +1,12 @@
SET @s = (SELECT IF(
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
AND table_name = 'Storage'
AND column_name = 'Enabled'
) > 0,
"SELECT 'Column Enabled already exists in Storage'",
"ALTER TABLE `Storage` ADD `Enabled` BOOLEAN NOT NULL default true AFTER `DoDelete`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;

1
db/zm_update-1.35.2.sql Normal file
View File

@ -0,0 +1 @@
ALTER TABLE Monitors MODIFY `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') NOT NULL default 'Local';

View File

@ -28,7 +28,7 @@
%global _hardened_build 1
Name: zoneminder
Version: 1.35.0
Version: 1.35.2
Release: 1%{?dist}
Summary: A camera monitoring and analysis tool
Group: System Environment/Daemons

View File

@ -1,8 +0,0 @@
<<<<<<< HEAD
zoneminder (1.31.0-trusty) trusty; urgency=medium
* placeholder
-- Isaac Connor <iconnor@connortechnology.com> Fri, 13 May 2016 09:45:49 -0400
=======
>>>>>>> master

View File

@ -1,7 +0,0 @@
version=3
opts=\
repacksuffix=+dfsg,\
dversionmangle=s{\+dfsg\d*}{},\
https://github.com/ZoneMinder/ZoneMinder/releases \
.*/ZoneMinder/archive/v(.*).tar.gz

View File

@ -1,98 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: zoneminder
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Should-Start: mysql
# Should-Stop: mysql
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Control ZoneMinder as a Service
# Description: ZoneMinder CCTV recording and surveillance system
### END INIT INFO
# chkconfig: 2345 20 20
# Source function library.
. /lib/lsb/init-functions
prog=ZoneMinder
ZM_PATH_BIN="/usr/bin"
RUNDIR="/var/run/zm"
TMPDIR="/tmp/zm"
command="$ZM_PATH_BIN/zmpkg.pl"
start() {
echo -n "Starting $prog: "
# Wait for mysqld to start. Continue if it takes too long.
count=0
while [ ! -e /var/run/mysqld/mysqld.sock ] && [ $count -lt 60 ]
do
sleep 1
count=$((count+1))
done
export TZ=:/etc/localtime
mkdir -p "$RUNDIR" && chown www-data:www-data "$RUNDIR"
mkdir -p "$TMPDIR" && chown www-data:www-data "$TMPDIR"
$command start
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
echo
[ $RETVAL = 0 ] && touch /var/lock/zm
return $RETVAL
}
stop() {
echo -n "Stopping $prog: "
#
# Why is this status check being done?
# as $command stop returns 1 if zoneminder
# is stopped, which will result in
# this returning 1, which will stuff
# dpkg when it tries to stop zoneminder before
# uninstalling . . .
#
result=`$command status`
if [ ! "$result" = "running" ]; then
echo "Zoneminder already stopped"
echo
RETVAL=0
else
$command stop
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
echo
[ $RETVAL = 0 ] && rm -f /var/lock/zm
fi
}
status() {
result=`$command status`
if [ "$result" = "running" ]; then
echo "ZoneMinder is running"
RETVAL=0
else
echo "ZoneMinder is stopped"
RETVAL=1
fi
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart' | 'force-reload')
stop
start
;;
'status')
status
;;
*)
echo "Usage: $0 { start | stop | restart | status }"
RETVAL=1
;;
esac
exit $RETVAL

View File

@ -1 +0,0 @@
/tmp/zm /usr/share/zoneminder/www/api/app/tmp

View File

@ -1,66 +0,0 @@
#! /bin/sh
set -e
if [ "$1" = "configure" ]; then
. /etc/zm/zm.conf
for i in /etc/zm/conf.d/*.conf; do
. $i
done;
# The logs can contain passwords, etc... so by setting group root, only www-data can read them, not people in the www-data group
chown www-data:root /var/log/zm
chown www-data:www-data /var/lib/zm
if [ -z "$2" ]; then
chown www-data:www-data /var/cache/zoneminder /var/cache/zoneminder/*
fi
# Do this every time the package is installed or upgraded
# Ensure zoneminder is stopped
invoke-rc.d zoneminder stop || true
if [ "$ZM_DB_HOST" = "localhost" ]; then
if [ -e "/etc/init.d/mysql" ]; then
#
# Get mysql started if it isn't
#
if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then
invoke-rc.d mysql start
fi
if $(/etc/init.d/mysql status >/dev/null 2>&1); then
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
# test if database if already present...
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
if [ $? -ne 0 ]; then
echo "Error creating db."
exit 1;
fi
# This creates the user.
echo "grant lock tables, alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost identified by \"${ZM_DB_PASS}\";" | mysql --defaults-file=/etc/mysql/debian.cnf mysql
else
echo "grant lock tables, alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql
fi
zmupdate.pl --nointeractive
zmupdate.pl --nointeractive -f
# Add any new PTZ control configurations to the database (will not overwrite)
zmcamtool.pl --import >/dev/null 2>&1
else
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
fi
else
echo 'mysql not found, assuming remote server.'
fi
else
echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)"
fi
echo "Done Updating, starting ZoneMinder"
invoke-rc.d zoneminder start || true
fi
#DEBHELPER#

View File

@ -1,36 +0,0 @@
#!/bin/sh
set -e
## Remove obsolete symlink which is in the way of dh_apache2:
ol="/etc/apache2/conf-available/zoneminder.conf"
if [ -h "${ol}" ]; then
[ "$(readlink ${ol})" = "/etc/zm/apache.conf" ] && rm -f "${ol}"
fi
abort=false
if [ -h /usr/share/zoneminder/www/events ]; then
l=$(readlink /usr/share/zoneminder/www/events)
if [ "$l" != "/var/cache/zoneminder/events" ]; then
abort=true
fi
fi
if [ -h /usr/share/zoneminder/www/images ]; then
l=$(readlink /usr/share/zoneminder/www/images )
if [ "$l" != "/var/cache/zoneminder/images" ]; then
abort=true
fi
fi
if [ "$abort" = "true" ]; then
cat >&2 << EOF
Aborting installation of zoneminder due to non-default symlinks in
/usr/share/zoneminder for the images and/or events directory, which could
result in loss of data. Please move your data in each of these directories to
/var/cache/zoneminder before installing zoneminder from the package.
EOF
exit 1
fi
#DEBHELPER#

View File

@ -1,3 +0,0 @@
d /var/run/zm 0755 www-data www-data
d /tmp/zm 0755 www-data www-data
d /var/tmp/zm 0755 www-data www-data

View File

@ -1,51 +0,0 @@
zoneminder for Debian
---------------------
There is one manual step to get the web interface working.
You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf,
then reload the apache config (i.e. /etc/init.d/apache2 reload)
Changing the location for images and events
-------------------------------------------
Zoneminder, in its upstream form, stores data in /usr/share/zoneminder/. This
package modifies that by changing /usr/share/zoneminder/images and
/usr/share/zoneminder/events to symlinks to directories under
/var/cache/zoneminder.
There are numerous places these could be put and ways to do it. But, at the
moment, if you change this, an upgrade will fail with a warning about these
locations having changed (the reason for this was that previously, an upgrade
would silently revert the changes and cause event loss - refer
bug #608793).
If you do want to change the location, here are a couple of suggestions.
These lines would mount /dev/sdX1 to /video_storage, and then 'link' /video_storage
to the locations that ZoneMinder expects them to be at.
/dev/sdX1 /video_storage ext4 defaults 0 2
/video_storage/zoneminder/images /var/cache/zoneminder/images none bind 0 2
/video_storage/zoneminder/events /var/cache/zoneminder/events none bind 0 2
or if you have a separate partition for each:
/dev/sdX1 /var/cache/zoneminder/images ext4 defaults 0 2
/dev/sdX2 /var/cache/zoneminder/events ext4 defaults 0 2
-- Peter Howard <pjh@northern-ridge.com.au>, Sun, 16 Jan 2010 01:35:51 +1100
Access to /dev/video*
---------------------
For cameras which require access to /dev/video*, zoneminder may need the
www-data user added to the video group in order to see those cameras:
adduser www-data video
Note that all web applications running on the zoneminder server will then have
access to all video devices on the system.
-- Vagrant Cascadian <vagrant@debian.org> Sun, 27 Mar 2011 13:06:56 -0700

View File

@ -1,9 +0,0 @@
Alias /zm /usr/share/zoneminder
<Directory /usr/share/zoneminder>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>

View File

@ -1,323 +0,0 @@
zoneminder (1.30.2-trusty-2016033001) trusty; urgency=medium
* merge master
-- Isaac Connor <iconnor@connortechnology.com> Wed, 30 Mar 2016 14:09:48 -0400
zoneminder (1.30.2-trusty-2016032901) trusty; urgency=medium
* filter fixes, merge options rework by Kyle
-- Isaac Connor <iconnor@connortechnology.com> Tue, 29 Mar 2016 12:27:57 -0400
zoneminder (1.30.2-trusty-2016030702) trusty; urgency=medium
*
-- Isaac Connor <iconnor@connortechnology.com> Mon, 07 Mar 2016 22:14:03 -0500
zoneminder (1.30.2-trusty-2016030701) trusty; urgency=medium
* merge master. with telemetry
-- Isaac Connor <iconnor@connortechnology.com> Mon, 07 Mar 2016 21:47:53 -0500
zoneminder (1.30.2-trusty-2016022101) trusty; urgency=medium
* merge zmtrigger fix
-- Isaac Connor <iconnor@testing.internal.point-one.com> Mon, 22 Feb 2016 09:15:53 -0500
zoneminder (1.30.2-trusty-2016021901) trusty; urgency=medium
* zmtrigger improvements
-- Isaac Connor <iconnor@testing.internal.point-one.com> Fri, 19 Feb 2016 11:09:57 -0500
zoneminder (1.30.2-trusty-2016021701) trusty; urgency=medium
* printout id, and ip address when failing to connect
-- Isaac Connor <iconnor@testing.internal.point-one.com> Wed, 17 Feb 2016 09:40:49 -0500
zoneminder (1.30.2-trusty-2016021001) trusty; urgency=medium
*
-- Isaac Connor <iconnor@testing.internal.point-one.com> Wed, 10 Feb 2016 13:06:09 -0500
zoneminder (1.29.111-trusty-2016020101) trusty; urgency=medium
* Fix video download and use of Storage Areas
-- Isaac Connor <iconnor@testing.internal.point-one.com> Mon, 01 Feb 2016 13:42:06 -0500
zoneminder (1.29.111-trusty-2016011401) trusty; urgency=medium
* fix timeline view for storageareas
-- Isaac Connor <iconnor@testing.internal.point-one.com> Thu, 14 Jan 2016 14:03:41 -0500
zoneminder (1.29.111-trusty-2016010801) trusty; urgency=medium
* Add better debug and skip when event links are not just digits. Merge multi-server stuff from master.
-- Isaac Connor <iconnor@testing.internal.point-one.com> Fri, 08 Jan 2016 10:37:16 -0500
zoneminder (1.29.111-trusty-2016010401) trusty; urgency=medium
* include fix to rotate image dimensions when applying a rotation
-- Isaac Connor <iconnor@testing.internal.point-one.com> Mon, 04 Jan 2016 13:24:42 -0500
zoneminder (1.29.111-trusty-2016010101) trusty; urgency=medium
* fix logging with multi-server
-- Isaac Connor <iconnor@testing.internal.point-one.com> Fri, 01 Jan 2016 17:11:09 -0500
zoneminder (1.29.111-trusty-2015123101) trusty; urgency=medium
* Add log filtering from multi-server
-- Isaac Connor <iconnor@testing.internal.point-one.com> Thu, 31 Dec 2015 10:18:03 -0500
zoneminder (1.29.109-trusty-2015122401) trusty; urgency=medium
* fix delete events not in database in zmaudit.pl
-- Isaac Connor <iconnor@testing.internal.point-one.com> Thu, 24 Dec 2015 12:38:05 -0500
zoneminder (1.29.109-trusty-2015122301) trusty; urgency=medium
* todays release
-- Isaac Connor <iconnor@testing.internal.point-one.com> Wed, 23 Dec 2015 09:33:46 -0500
zoneminder (1.29.109-trusty-2015122202) trusty; urgency=medium
* more object work and zmaudit
-- Isaac Connor <iconnor@testing.internal.point-one.com> Tue, 22 Dec 2015 13:13:56 -0500
zoneminder (1.29.109-trusty-2015122201) trusty; urgency=medium
* merge multi-server, and master stuff, start work on zmaudit storage areas support
-- Isaac Connor <iconnor@testing.internal.point-one.com> Tue, 22 Dec 2015 11:11:44 -0500
zoneminder (1.29.109-trusty-2015122103) trusty; urgency=medium
* Fixes
-- Isaac Connor <iconnor@testing.internal.point-one.com> Mon, 21 Dec 2015 15:20:15 -0500
zoneminder (1.29.109-trusty-2015122102) trusty; urgency=medium
* fix deleting events
-- Isaac Connor <iconnor@testing.internal.point-one.com> Mon, 21 Dec 2015 14:49:12 -0500
zoneminder (1.29.109-trusty-2015122101) trusty; urgency=medium
* Make zmfilter work.
-- Isaac Connor <iconnor@testing.internal.point-one.com> Mon, 21 Dec 2015 12:32:27 -0500
zoneminder (1.29.109-trusty-2015121803) trusty; urgency=medium
* merge zmvideo improvements
-- Isaac Connor <iconnor@testing.internal.point-one.com> Fri, 18 Dec 2015 14:17:56 -0500
zoneminder (1.29.109-trusty-2015121802) trusty; urgency=medium
* Add some missing files to the autoconf build
-- Isaac Connor <iconnor@testing.internal.point-one.com> Fri, 18 Dec 2015 12:14:08 -0500
zoneminder (1.29.109-trusty-2015121801) trusty; urgency=medium
*
-- Isaac Connor <iconnor@testing.internal.point-one.com> Fri, 18 Dec 2015 11:05:58 -0500
zoneminder (1.29.109-trusty-2015121701) trusty; urgency=medium
* Merge master + better zmvideo
-- Isaac Connor <iconnor@testing.internal.point-one.com> Thu, 17 Dec 2015 15:11:18 -0500
zoneminder (1.29.0-trusty-2015112301) trusty; urgency=medium
* apply fix for zms crash
-- Isaac Connor <iconnor@testing.internal.point-one.com> Mon, 23 Nov 2015 10:47:49 -0500
zoneminder (1.29.0-trusty-2015110601) trusty; urgency=medium
* add a FIONREAD test on timeout
-- Isaac Connor <iconnor@testing.internal.point-one.com> Wed, 22 Jul 2015 09:55:37 -0400
zoneminder (1.29.0-trusty-2015072201) trusty; urgency=medium
* add AnalysisFPS
-- Isaac Connor <iconnor@testing.internal.point-one.com> Wed, 22 Jul 2015 09:55:37 -0400
zoneminder (1.29.0-trusty-2015071601) trusty; urgency=medium
* Merge master and zmtrigger
-- Isaac Connor <iconnor@testing.internal.point-one.com> Thu, 16 Jul 2015 13:15:58 -0400
zoneminder (1.29.0-trusty-38) trusty; urgency=medium
* Merge master
-- Isaac Connor <iconnor@testing.internal.point-one.com> Tue, 14 Jul 2015 10:15:00 -0400
zoneminder (1.29.0-trusty-37) trusty; urgency=medium
* merge master api stuff, set sleep after failure to capture to 5000 instead of 5000000
-- Isaac Connor <iconnor@testing.internal.point-one.com> Fri, 19 Jun 2015 09:59:54 -0400
zoneminder (1.29.0-trusty-36) trusty; urgency=medium
* Detect select interuption when no action on our fd
-- Isaac Connor <iconnor@testing.internal.point-one.com> Thu, 28 May 2015 09:35:59 -0400
zoneminder (1.29.0-trusty-35) trusty; urgency=medium
* better logging
-- Isaac Connor <iconnor@testing.internal.point-one.com> Fri, 22 May 2015 15:30:42 -0400
zoneminder (1.29.0-trusty-34) trusty; urgency=medium
* Faster shutdown and changes to ReadData
-- Isaac Connor <iconnor@testing.internal.point-one.com> Thu, 21 May 2015 15:54:47 -0400
zoneminder (1.29.0-trusty-33) trusty; urgency=medium
* update zmaudit some more
-- Isaac Connor <iconnor@testing.internal.point-one.com> Thu, 14 May 2015 13:44:35 -0400
zoneminder (1.29.0-trusty-32) trusty; urgency=medium
* merge zmaudit_updates1
-- Isaac Connor <iconnor@testing.internal.point-one.com> Wed, 13 May 2015 15:51:56 -0400
zoneminder (1.29.0-trusty-31) trusty; urgency=medium
* Merge some fixes and zmaudit improvements
-- Isaac Connor <iconnor@testing.internal.point-one.com> Wed, 13 May 2015 15:16:19 -0400
zoneminder (1.29.0-trusty-27) trusty; urgency=medium
* fflush logs, merge master.
-- Isaac Connor <iconnor@testing.internal.point-one.com> Mon, 30 Mar 2015 19:28:05 -0400
zoneminder (1.29.0-vivid-26) vivid; urgency=medium
* logging improvements, merge RedData changes
-- Isaac Connor <iconnor@connortechnology.com> Wed, 04 Mar 2015 16:39:19 -0500
zoneminder (1.29.0-vivid-25) vivid; urgency=medium
* some change to ReadData
-- Isaac Connor <iconnor@connortechnology.com> Mon, 02 Mar 2015 12:57:16 -0500
zoneminder (1.29.0-utopic-24) utopic; urgency=medium
* merge local_raw
-- Isaac Connor <iconnor@connortechnology.com> Mon, 23 Feb 2015 17:49:36 -0500
zoneminder (1.29.0-trusty-23) trusty; urgency=medium
* more onvif merges, fix to zmfilter
-- Isaac Connor <iconnor@testing.internal.point-one.com> Sat, 21 Feb 2015 16:17:01 -0500
zoneminder (1.29.0-trusty-22) trusty; urgency=medium
* updates from master: merge onvif, default to classic if skin not defined.
-- Isaac Connor <iconnor@connortechnology.com> Thu, 19 Feb 2015 18:14:58 -0500
zoneminder (1.29.0-utopic-21) utopic; urgency=medium
* updates from master, improve monitor probing and support TRENDnet cameras
-- Isaac Connor <iconnor@connortechnology.com> Tue, 17 Feb 2015 14:18:52 -0500
zoneminder (1.29.0-wheezy-20) wheezy; urgency=medium
* zmaudit.pl improvements - double check db before deleting fs event
-- Isaac Connor <iconnor@connortechnology.com> Wed, 04 Feb 2015 11:09:22 -0500
zoneminder (1.29.0-utopic-18) utopic; urgency=medium
* RTSP Timeout fixes
-- Isaac Connor <iconnor@connortechnology.com> Wed, 28 Jan 2015 13:49:16 -0500
zoneminder (1.29.0-utopic-17) utopic; urgency=medium
* Merge master, use new split-up debian build
-- Isaac Connor <iconnor@connortechnology.com> Mon, 26 Jan 2015 11:21:07 -0500
zoneminder (1.28.0+nmu1) testing; urgency=medium
* Non-maintainer upload
* Split the debian package into several packages
* Switch to native source format
-- Emmanuel Papin <manupap01@gmail.com> Thu, 15 Jan 2015 20:00:08 +0100
zoneminder (1.28.0-0.2) testing; urgency=medium
* Non-maintainer upload.
* Upstream release for debian jessie
* Package dependencies updated
* debhelper version upgraded
* Standards-Version upgraded
* Use debhelper commands instead of standard commands
* Install man pages in /usr/share/man (patch added)
* Switch to quilt
* Switch to systemd
* Some lintian fixes
-- Emmanuel Papin <manupap01@gmail.com> Wed, 26 Nov 2014 00:26:01 +0100
zoneminder (1.28.0-0.1) stable; urgency=medium
* Release
-- Isaac Connor <iconnor@connortechnology.com> Fri, 17 Oct 2014 09:27:22 -0400
zoneminder (1.27.99+1-testing-SNAPSHOT2014072901) testing; urgency=medium
* improve error messages
* Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates
-- Isaac Connor <iconnor@connortechnology.com> Tue, 29 Jul 2014 14:50:20 -0400
zoneminder (1.27.0+1-testing-v4ltomonitor-1) testing; urgency=high
* Snapshot release -
-- Isaac Connor <iconnor@connortechnology.com> Wed, 09 Jul 2014 21:35:29 -0400

View File

@ -1 +0,0 @@
9

View File

@ -1,122 +0,0 @@
Source: zoneminder
Section: net
Priority: optional
Maintainer: Isaac Connor <iconnor@connortechnology.com>
Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), autoconf, automake, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev | libgcrypt20-dev, libpolkit-gobject-1-dev, libdbi-perl, libnet-sftp-foreign-perl, libexpect-perl, libmime-tools-perl, libx264-dev, libmp4v2-dev, libpcre3-dev
Standards-Version: 3.9.6
Package: zoneminder
Section: metapackages
Architecture: all
Depends: ${misc:Depends},
libzoneminder-perl (>= ${source:Version}),
zoneminder-database (>= ${source:Version}),
zoneminder-core (>= ${binary:Version}),
zoneminder-ui-base (>= ${source:Version}),
zoneminder-ui-classic (>= ${source:Version}),
zoneminder-ui-mobile (>= ${source:Version}),
zoneminder-ui-xml (>= ${source:Version})
Description: Video camera security and surveillance solution (metapackage)
ZoneMinder is intended for use in single or multi-camera video security
applications, including commercial or home CCTV, theft prevention and child
or family member or home monitoring and other care scenarios. It
supports capture, analysis, recording, and monitoring of video data coming
from one or more video or network cameras attached to a Linux system.
ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom
cameras using a variety of protocols. It is suitable for use as a home
video security system and for commercial or professional video security
and surveillance. It can also be integrated into a home automation system
via X.10 or other protocols.
Package: libzoneminder-perl
Section: perl
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, libdbi-perl,
libdevice-serialport-perl, libimage-info-perl, libjson-any-perl, libjson-maybexs-perl,
libsys-mmap-perl, liburi-encode-perl, libwww-perl
Description: Perl libraries for ZoneMinder
ZoneMinder is a video camera security and surveillance solution.
.
This package provides the libraries for the perl scripts, it can be used to
write custom interfaces as well.
Package: zoneminder-database
Section: database
Architecture: all
Depends: ${misc:Depends}, debconf, dbconfig-common,
mysql-client | mariadb-client
Recommends: mysql-server | mariadb-server
Description: Database management package for ZoneMinder
ZoneMinder is a video camera security and surveillance solution.
.
This package provides the sql files and maintenance scripts to perform all the
database operations (installation, upgrade or removal) on a local or a remote
server.
Package: zoneminder-core
Section: video
Architecture: any
Depends: libzoneminder-perl (= ${source:Version}),
zoneminder-database (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends},
${perl:Depends}, libarchive-tar-perl, libarchive-zip-perl, libdate-manip-perl,
libdbi-perl, libmodule-load-conditional-perl, libmime-lite-perl,
libmime-tools-perl, libnet-sftp-foreign-perl, libphp-serialization-perl,
debconf, ffmpeg | libav-tools, rsyslog | system-log-daemon, zip,
policykit-1, apache2, libmp4v2-2, libpcre++0
Description: Core binaries and perl scripts for ZoneMinder
ZoneMinder is a video camera security and surveillance solution.
.
This package provides the executable compiled binaries which do the main video
processing work and the perl scripts which perform helper and/or external
interface tasks.
Package: zoneminder-core-dbg
Priority: extra
Section: debug
Architecture: any
Depends: zoneminder-core (= ${binary:Version}), ${misc:Depends}
Description: Debugging symbols for ZoneMinder
ZoneMinder is a video camera security and surveillance solution.
.
This package provides the debugging symbols for the executable compiled
binaries.
Package: zoneminder-ui-base
Section: web
Architecture: any
Depends: zoneminder-core (= ${binary:Version}), ${shlibs:Depends},
${misc:Depends}, debconf, apache2, libapache2-mod-php5 | libapache2-mod-fcgid,
php5, php5-mysql | php5-mysqlnd, php5-gd
Description: Essential files for ZoneMinder's web user interface
ZoneMinder is a video camera security and surveillance solution.
.
This package provides the essential web files and maintenance scripts to set up
a basic web environment.
Package: zoneminder-ui-classic
Section: web
Architecture: all
Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends}
Description: Classic web user interface for ZoneMinder
ZoneMinder is a video camera security and surveillance solution.
.
This package provides the classic web user interface.
Package: zoneminder-ui-mobile
Section: web
Architecture: all
Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends}
Description: Mobile web user interface for ZoneMinder
ZoneMinder is a video camera security and surveillance solution.
.
This package provides the web user interface for mobile devices.
Package: zoneminder-ui-xml
Section: web
Architecture: all
Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends}
Description: XML interface for ZoneMinder
ZoneMinder is a video camera security and surveillance solution.
.
This package provides a XML interface mainly intended for use with the eyeZm
iPhone Application, but can be used with any other custom programs as well.

View File

@ -1,22 +0,0 @@
Copyright:
Copyright 2002 Philip Coombes <philip.coombes@zoneminder.com>
License:
This package is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
On Debian GNU/Linux systems, the text of the GPL can be found in
/usr/share/common-licenses/GPL.

View File

@ -1 +0,0 @@
README.md

View File

@ -1,4 +0,0 @@
usr/share/perl5/ZoneMinder
usr/share/perl5/ZoneMinder.pm
debian/tmp/usr/share/man/man3/ZoneMinder.3pm
debian/tmp/usr/share/man/man3/ZoneMinder::*

View File

@ -1,3 +0,0 @@
[type: gettext/rfc822deb] zoneminder-core.templates
[type: gettext/rfc822deb] zoneminder-database.templates
[type: gettext/rfc822deb] zoneminder-ui-base.templates

View File

@ -1,252 +0,0 @@
# debconf french translation file for ZoneMinder.
# Copyright (C) 2001-2008 Philip Coombes
# This file is distributed under the same license as the zoneminder package.
# First author: Emmanuel Papin <manupap01@gmail.com>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: zoneminder\n"
"Report-Msgid-Bugs-To: zoneminder@packages.debian.org\n"
"POT-Creation-Date: 2014-12-16 12:34+0100\n"
"PO-Revision-Date: 2014-12-07 00:40+0100\n"
"Last-Translator: Emmanuel Papin <manupap01@gmail.com>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:1001
msgid "Delete this non empty directory?"
msgstr "Supprimer ce répertoire non vide ?"
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:1001
msgid ""
"A purge of the ZoneMinder package is performed but the directory '/var/cache/"
"zoneminder' is not empty so it will not be deleted."
msgstr ""
"Une purge du paquet ZoneMinder est en cours mais le répertoire '/var/cache/"
"zoneminder' n'est pas vide et sera donc conservé."
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:1001
msgid ""
"Please consider that this directory is designed to contain data resulting "
"from event detection. Therefore, \"proof of evidence\" could be lost!\""
msgstr ""
"Veuillez considérer que ce répertoire est conçu pour contenir des données "
"résultants de la détection d'événements. Par conséquent, des preuves "
"pourraient être perdues !"
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:1001
msgid ""
"If you are not sure of your decision, please do not delete this directory "
"but perform a manual checkup."
msgstr ""
"Si vous n'êtes pas sûr de votre décision, veuillez conserver ce répertoire "
"et effectuer une vérification manuelle."
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:2001
msgid "Deletion confirmed?"
msgstr "Supression confirmée ?"
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:2001
msgid ""
"You have allowed the deletion of directory '/var/cache/zoneminder' although "
"it may contain critical data."
msgstr ""
"Vous avez autorisé la suppression du répertoire '/var/cache/zoneminder' bien "
"qu'il puisse contenir des données critiques."
#. Type: select
#. Choices
#: ../zoneminder-database.templates:1001
msgid "local"
msgstr "local"
#. Type: select
#. Choices
#: ../zoneminder-database.templates:1001
msgid "remote"
msgstr "distant"
#. Type: select
#. Description
#: ../zoneminder-database.templates:1002
msgid "Database location:"
msgstr "Emplacement de la base de donnée :"
#. Type: select
#. Description
#: ../zoneminder-database.templates:1002
msgid ""
"A database server is required to run ZoneMinder. The database can be "
"installed either locally or remotely on a machine of your network."
msgstr ""
"Un serveur de base de données est requis pour ZoneMinder. La base de donnée "
"peut être installée localement ou à distance sur une machine de votre réseau."
#. Type: select
#. Description
#: ../zoneminder-database.templates:1002
msgid ""
"If you choose a remote location, you will have to select the 'tcp/ip' "
"connection method and enter the hostname or ip address of the remote machine "
"in the next configuration screens."
msgstr ""
"Si vous choisissez un emplacement distant, vous devrez sélectionner la "
"méthode de connexion 'tcp/ip' et entrer le nom réseau ou l'adresse ip de la "
"machine distante dans les écrans de configuration suivants."
#. Type: error
#. Description
#: ../zoneminder-database.templates:2001
msgid "No local database server is available:"
msgstr "Aucun serveur local de base de données n'est disponible :"
#. Type: error
#. Description
#: ../zoneminder-database.templates:2001
msgid ""
"Currently ZoneMinder supports mysql or mariadb database server but none of "
"them appears to be installed on this machine."
msgstr ""
"Actuellement ZoneMinder supporte les serveurs de base de données mysql et "
"mariadb mais aucun d'entre eux n'est installé sur cette machine."
#. Type: error
#. Description
#: ../zoneminder-database.templates:2001
msgid ""
"In order to complete ZoneMinder's installation, after ending of this "
"assistant, please install a compatible database server and then restart the "
"assistant by invoking:"
msgstr ""
"Afin de compléter l'installation de ZoneMinder, après la fermeture de cet "
"assitant, veuillez installer un serveur de base de données compatible et "
"ensuite redémarrez l'assistant en invoquant :"
#. Type: error
#. Description
#. Type: error
#. Description
#: ../zoneminder-database.templates:2001 ../zoneminder-database.templates:3001
msgid "$ sudo dpkg-reconfigure zoneminder"
msgstr "$ sudo dpkg-reconfigure zoneminder"
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid "Remote database servers are not allowed:"
msgstr "Les serveurs de base de données distants ne sont pas autorisés :"
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid ""
"The current configuration of dbconfig-common does not allow installation of "
"a database on remote servers."
msgstr ""
"La configuration actuelle de dbconfig-common ne permet pas l'installation de "
"bases de données sur des serveurs distants."
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid ""
"In order to reconfigure dbconfig-common, please invoke the following command "
"after ending of this assistant:"
msgstr ""
"Afin de reconfigurer dbconfig-common, veuillez invoquer la commande suivante "
"après la fermeture de cet assitant :"
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid "$ sudo dpkg-reconfigure dbconfig-common"
msgstr "$ sudo dpkg-reconfigure dbconfig-common"
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid ""
"Then, to complete ZoneMinder's installation, please restart this assistant "
"by invoking:"
msgstr ""
"Ensuite, pour compléter l'installation de ZoneMinder, veuillez redémarrer "
"cet assistant en invoquant :"
#. Type: password
#. Description
#: ../zoneminder-database.templates:4001
msgid "New password for the ZoneMinder 'admin' user:"
msgstr "Nouveau mot de passe pour le compte 'admin' de ZoneMinder :"
#. Type: password
#. Description
#: ../zoneminder-database.templates:4001
msgid "Please enter the password of the default administrative user."
msgstr "Veuillez entrer le mot de passe du compte administrateur par défaut."
#. Type: password
#. Description
#: ../zoneminder-database.templates:4001
msgid ""
"While not mandatory, it is highly recommended that you set a custom password "
"for the administrative 'admin' user."
msgstr ""
"Bien que cela ne soit pas obligatoire, il est fortement recommandé de "
"fournir un mot de passe personnalisé pour le compte administrateur 'admin'."
#. Type: password
#. Description
#: ../zoneminder-database.templates:4001
msgid "If this field is left blank, the password will not be changed."
msgstr "Si le champ est laissé vide, le mot de passe ne sera pas changé."
#. Type: password
#. Description
#: ../zoneminder-database.templates:5001
msgid "Repeat password for the ZoneMinder 'admin' user:"
msgstr "Répéter le mot de passe pour le compte 'admin' de ZoneMinder :"
#. Type: error
#. Description
#: ../zoneminder-database.templates:6001
msgid "Password input error"
msgstr "Erreur de mot de passe"
#. Type: error
#. Description
#: ../zoneminder-database.templates:6001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
"Les deux mots de passe saisis ne sont pas les mêmes. Veuillez essayer à "
"nouveau."
#. Type: multiselect
#. Description
#: ../zoneminder-ui-base.templates:1001
msgid "Web server to reconfigure automatically:"
msgstr "Serveur web à reconfigurer automatiquement :"
#. Type: multiselect
#. Description
#: ../zoneminder-ui-base.templates:1001
msgid ""
"Please choose the web server that should be automatically configured for "
"ZoneMinder's web portal access."
msgstr ""
"Veuillez choisir le serveur web à reconfigurer automatiquement pour l'accès "
"au portail web de ZoneMinder."

View File

@ -1,222 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: zoneminder\n"
"Report-Msgid-Bugs-To: zoneminder@packages.debian.org\n"
"POT-Creation-Date: 2014-12-16 12:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:1001
msgid "Delete this non empty directory?"
msgstr ""
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:1001
msgid ""
"A purge of the ZoneMinder package is performed but the directory '/var/cache/"
"zoneminder' is not empty so it will not be deleted."
msgstr ""
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:1001
msgid ""
"Please consider that this directory is designed to contain data resulting "
"from event detection. Therefore, \"proof of evidence\" could be lost!\""
msgstr ""
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:1001
msgid ""
"If you are not sure of your decision, please do not delete this directory "
"but perform a manual checkup."
msgstr ""
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:2001
msgid "Deletion confirmed?"
msgstr ""
#. Type: boolean
#. Description
#: ../zoneminder-core.templates:2001
msgid ""
"You have allowed the deletion of directory '/var/cache/zoneminder' although "
"it may contain critical data."
msgstr ""
#. Type: select
#. Choices
#: ../zoneminder-database.templates:1001
msgid "local"
msgstr ""
#. Type: select
#. Choices
#: ../zoneminder-database.templates:1001
msgid "remote"
msgstr ""
#. Type: select
#. Description
#: ../zoneminder-database.templates:1002
msgid "Database location:"
msgstr ""
#. Type: select
#. Description
#: ../zoneminder-database.templates:1002
msgid ""
"A database server is required to run ZoneMinder. The database can be "
"installed either locally or remotely on a machine of your network."
msgstr ""
#. Type: select
#. Description
#: ../zoneminder-database.templates:1002
msgid ""
"If you choose a remote location, you will have to select the 'tcp/ip' "
"connection method and enter the hostname or ip address of the remote machine "
"in the next configuration screens."
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:2001
msgid "No local database server is available:"
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:2001
msgid ""
"Currently ZoneMinder supports mysql or mariadb database server but none of "
"them appears to be installed on this machine."
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:2001
msgid ""
"In order to complete ZoneMinder's installation, after ending of this "
"assistant, please install a compatible database server and then restart the "
"assistant by invoking:"
msgstr ""
#. Type: error
#. Description
#. Type: error
#. Description
#: ../zoneminder-database.templates:2001 ../zoneminder-database.templates:3001
msgid "$ sudo dpkg-reconfigure zoneminder"
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid "Remote database servers are not allowed:"
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid ""
"The current configuration of dbconfig-common does not allow installation of "
"a database on remote servers."
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid ""
"In order to reconfigure dbconfig-common, please invoke the following command "
"after ending of this assistant:"
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid "$ sudo dpkg-reconfigure dbconfig-common"
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:3001
msgid ""
"Then, to complete ZoneMinder's installation, please restart this assistant "
"by invoking:"
msgstr ""
#. Type: password
#. Description
#: ../zoneminder-database.templates:4001
msgid "New password for the ZoneMinder 'admin' user:"
msgstr ""
#. Type: password
#. Description
#: ../zoneminder-database.templates:4001
msgid "Please enter the password of the default administrative user."
msgstr ""
#. Type: password
#. Description
#: ../zoneminder-database.templates:4001
msgid ""
"While not mandatory, it is highly recommended that you set a custom password "
"for the administrative 'admin' user."
msgstr ""
#. Type: password
#. Description
#: ../zoneminder-database.templates:4001
msgid "If this field is left blank, the password will not be changed."
msgstr ""
#. Type: password
#. Description
#: ../zoneminder-database.templates:5001
msgid "Repeat password for the ZoneMinder 'admin' user:"
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:6001
msgid "Password input error"
msgstr ""
#. Type: error
#. Description
#: ../zoneminder-database.templates:6001
msgid "The two passwords you entered were not the same. Please try again."
msgstr ""
#. Type: multiselect
#. Description
#: ../zoneminder-ui-base.templates:1001
msgid "Web server to reconfigure automatically:"
msgstr ""
#. Type: multiselect
#. Description
#: ../zoneminder-ui-base.templates:1001
msgid ""
"Please choose the web server that should be automatically configured for "
"ZoneMinder's web portal access."
msgstr ""

View File

@ -1,154 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall
CPPFLAGS = -D__STDC_CONSTANT_MACROS
CXXFLAGS = -DHAVE_LIBCRYPTO
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
DEBOPT = --enable-debug
CFLAGS += -g
CXXFLAGS += -g
else
DEBOPT =
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# These are used to get the most recent version of the original sources from github
UURL = $(shell git config --get remote.origin.url)
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
HEAD = $(shell git rev-parse HEAD)
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-|\+nmu\d+.*)};')
DTYPE =
TARBALL = ../$(PKG)_$(VER)$(DTYPE).orig.tar.xz
%:
dh $@ --with autoreconf
override_dh_auto_configure:
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" dh_auto_configure -- \
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
--sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info --with-mysql=/usr \
--with-mariadb=/usr --with-webdir=/usr/share/zoneminder \
--with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin \
--with-webuser=www-data --with-webgroup=www-data \
--enable-mmap=yes $(DEBOPT)
override_dh_clean:
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean src/zm_config_defines.h
#
# Delete remaining auto-generated Makefile if Makefile.in exists
find $(CURDIR)/ -type f -name "Makefile" | while read file; do \
[ -f $$file.in ] && rm -f $$file; \
done || true
#
# Delete remaining auto-generated Makefile.in if Makefile.am exists
find $(CURDIR)/ -type f -name "Makefile.in" | while read filein; do \
fileam=`echo $$filein | sed 's/\(.*\)\.in/\1\.am/'`; \
[ -f $$fileam ] && rm -f $$filein; \
done || true
override_dh_install:
dh_install --fail-missing
#
# NOTE: This is a short-term kludge; hopefully changes in the next
# upstream version will render this unnecessary.
rm -rf debian/zoneminder/usr/share/zoneminder/events
rm -rf debian/zoneminder/usr/share/zoneminder/images
rm -rf debian/zoneminder/usr/share/zoneminder/temp
# The link stuff for these folders has been moved to
# zoneminder-core.links file
#
# This is a slightly lesser kludge; moving the cgi stuff to
# /usr/share/zoneminder/cgi-bin breaks one set of behavior,
# having it just in /usr/lib/cgi-bin breaks another bit of
# behavior.
# The link stuff for /usr/share/zoneminder/cgi-bin has been moved to
# zoneminder-ui-base.links file
override_dh_installinit:
dh_installinit --package=zoneminder-core --name=zoneminder
override_dh_systemd_start:
dh_systemd_start --package=zoneminder-core --name=zoneminder \
--restart-after-upgrade
override_dh_systemd_enable:
dh_systemd_enable --package=zoneminder-core --name=zoneminder
override_dh_fixperms:
dh_fixperms
#
# As requested by the Debian Webapps Policy Manual §3.2.1
chown root:www-data debian/zoneminder-core/etc/zm/zm.conf
chmod 640 debian/zoneminder-core/etc/zm/zm.conf
override_dh_auto_test:
# do not run tests...
.PHONY: override_dh_strip
override_dh_strip:
dh_strip --dbg-package=zoneminder-core-dbg
# Inspired by https://wiki.debian.org/onlyjob/get-orig-source
.PHONY: get-orig-source
get-orig-source: $(TARBALL) $(info I: $(PKG)_$(VER)$(DTYPE))
@
$(TARBALL):
$(if $(wildcard $(PKG)-$(VER)),$(error folder '$(PKG)-$(VER)' exists, aborting...))
@echo "# Cloning origin repository..."; \
if ! git clone $(UURL) $(PKG)-$(VER); then \
$(RM) -r $(PKG)-$(VER); \
echo "failed to clone repository, aborting..."; \
false; \
fi
@if [ $(BRANCH) != "master" ]; then \
cd $(PKG)-$(VER); \
echo "# Not on master branch, fetching origin branch '$(BRANCH)'..."; \
git fetch origin $(BRANCH):$(BRANCH) || false; \
echo "# Switching to branch '$(BRANCH)'..."; \
git checkout $(BRANCH) || false; \
fi
@echo "# Checking local source..."
@if [ $$(cd $(PKG)-$(VER) && git rev-parse HEAD) = $(HEAD) ]; then \
echo "even with origin, ok"; \
true; \
else \
echo "not even with origin, aborting..."; \
false; \
fi
@echo "# Setting times..."
@cd $(PKG)-$(VER) \
&& for F in $$(git ls-tree -r --name-only HEAD | sed -e "s/\s/\*/g"); do \
touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; \
done
@echo "# Cleaning-up..."
cd $(PKG)-$(VER) && $(RM) -r .git
@echo "# Packing file '$(TARBALL)'..."
@find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
| XZ_OPT="-6v" tar -caf "$(TARBALL)" -T- --owner=root --group=root --mode=a+rX \
&& $(RM) -r "$(PKG)-$(VER)"

View File

@ -1 +0,0 @@
3.0 (native)

View File

@ -1 +0,0 @@
extend-diff-ignore = "(^|/)(config\.sub|config\.guess|Makefile|aclocal.m4|compile|config.h.in|configure|depcomp|install-sh|missing)$"

View File

@ -1,11 +0,0 @@
#!/bin/sh
# config maintainer script for zoneminder-core package
set -e
# Source the debconf stuff
. /usr/share/debconf/confmodule
#DEBHELPER#
exit 0

View File

@ -1,4 +0,0 @@
var/log/zm
var/cache/zoneminder/events
var/cache/zoneminder/images
var/cache/zoneminder/temp

View File

@ -1,4 +0,0 @@
etc/zm
usr/bin
usr/share/polkit-1/actions
usr/share/polkit-1/rules.d

View File

@ -1,3 +0,0 @@
var/cache/zoneminder/events usr/share/zoneminder/events
var/cache/zoneminder/images usr/share/zoneminder/images
var/cache/zoneminder/temp usr/share/zoneminder/temp

View File

@ -1,80 +0,0 @@
#! /bin/sh
# postinst maintainer script for zoneminder-core package
set -e
# Source the debconf stuff
. /usr/share/debconf/confmodule
# Source the config file
CONFIGFILE=/etc/zm/zm.conf
. $CONFIGFILE
# Do this when the package is installed, upgraded or reconfigured
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
# Retrieve data from dbconfig (inputs from user)
. /etc/dbconfig-common/zoneminder.conf
# ZoneMinder config file handling
# Inspired by: http://manpages.debian.org/cgi-bin/man.cgi?query=debconf-devel&sektion=7
# Backup the config file
cp -a -f $CONFIGFILE ${CONFIGFILE}.postinst.bak
# Redeclare variables if missing in config file
test -z $dbc_dbserver || grep -Eq "^ *ZM_DB_HOST=" $CONFIGFILE \
|| echo "ZM_DB_HOST=" >> ${CONFIGFILE}.postinst.bak
test -z $dbc_dbname || grep -Eq "^ *ZM_DB_NAME=" $CONFIGFILE \
|| echo "ZM_DB_NAME=" >> ${CONFIGFILE}.postinst.bak
test -z $dbc_dbuser || grep -Eq "^ *ZM_DB_USER=" $CONFIGFILE \
|| echo "ZM_DB_USER=" >> ${CONFIGFILE}.postinst.bak
test -z $dbc_dbpass || grep -Eq "^ *ZM_DB_PASS=" $CONFIGFILE \
|| echo "ZM_DB_PASS=" >> ${CONFIGFILE}.postinst.bak
# Prevent ZM_DB_HOST to be empty if user selected the 'unix socket' method
if test -z $dbc_dbserver; then
dbc_dbserver_override="localhost"
else
dbc_dbserver_override=$dbc_dbserver
fi
# Update variables in config file
sed -i "s/^ *ZM_DB_HOST=.*/ZM_DB_HOST=$dbc_dbserver_override/" \
${CONFIGFILE}.postinst.bak
test -z $dbc_dbname || sed -i "s/^ *ZM_DB_NAME=.*/ZM_DB_NAME=$dbc_dbname/" \
${CONFIGFILE}.postinst.bak
test -z $dbc_dbuser || sed -i "s/^ *ZM_DB_USER=.*/ZM_DB_USER=$dbc_dbuser/" \
${CONFIGFILE}.postinst.bak
test -z $dbc_dbpass || sed -i "s/^ *ZM_DB_PASS=.*/ZM_DB_PASS=$dbc_dbpass/" \
${CONFIGFILE}.postinst.bak
# Clean-up backup file
mv -f ${CONFIGFILE}.postinst.bak $CONFIGFILE
# Set some file permissions
chown $ZM_WEB_USER:$ZM_WEB_GROUP /var/log/zm
if [ -z "$2" ]; then
chown $ZM_WEB_USER:$ZM_WEB_GROUP -R /var/cache/zoneminder
fi
# As requested by the Debian Webapps Policy Manual §3.2.1
chown root:${ZM_WEB_GROUP} $CONFIGFILE
chmod 640 $CONFIGFILE
fi
# Do this every time the package is installed or upgraded
# Test for database presence to avoid failure of zmupdate.pl
if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then
# Ensure zoneminder is stopped
deb-systemd-invoke stop zoneminder.service || exit $?
# Run the ZoneMinder update tool
zmupdate.pl --nointeractive
fi
#DEBHELPER#
exit 0

View File

@ -1,37 +0,0 @@
#! /bin/sh
# postrm maintainer script for zoneminder-core package
set -e
# Source the debconf stuff
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
if [ "$1" = "purge" ]; then
# Ask the user if we have to remove the cache directory even if not empty
if [ -d /var/cache/zoneminder ] \
&& [ ! $(find /var/cache/zoneminder -maxdepth 0 -type d -empty 2>/dev/null) ]; then
RET=""
db_input high zoneminder/ask_delete || true
db_go || true
db_get zoneminder/ask_delete
if [ "$RET" = "true" ]; then
RET=""
db_input high zoneminder/ask_delete_again || true
db_go || true
db_get zoneminder/ask_delete_again
if [ "$RET" = "true" ]; then
rm -rf /var/cache/zoneminder
fi
fi
fi
fi
#DEBHELPER#
# postrm rm may freeze without that
db_stop
exit 0

View File

@ -1,33 +0,0 @@
#!/bin/sh
# preinst maintainer script for zoneminder-core package
set -e
abort=false
if [ -L /usr/share/zoneminder/events ]; then
l=$(readlink /usr/share/zoneminder/events)
if [ "$l" != "/var/cache/zoneminder/events" ]; then
abort=true
fi
fi
if [ -L /usr/share/zoneminder/images ]; then
l=$(readlink /usr/share/zoneminder/images )
if [ "$l" != "/var/cache/zoneminder/images" ]; then
abort=true
fi
fi
if [ "$abort" = "true" ]; then
cat >&2 << EOF
Aborting installation of zoneminder due to non-default symlinks in
/usr/share/zoneminder for the images and/or events directory, which could
result in loss of data. Please move your data in each of these directories to
/var/cache/zoneminder before installing zoneminder from the package.
EOF
exit 1
fi
#DEBHELPER#
exit 0

View File

@ -1,19 +0,0 @@
Template: zoneminder/ask_delete
Type: boolean
Default: false
_Description: Delete this non empty directory?
A purge of the ZoneMinder package is performed but the directory
'/var/cache/zoneminder' is not empty so it will not be deleted.
.
Please consider that this directory is designed to contain data resulting from
event detection. Therefore, "proof of evidence" could be lost!"
.
If you are not sure of your decision, please do not delete this directory but
perform a manual checkup.
Template: zoneminder/ask_delete_again
Type: boolean
Default: false
_Description: Deletion confirmed?
You have allowed the deletion of directory '/var/cache/zoneminder' although
it may contain critical data.

View File

@ -1,90 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: zoneminder
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Should-Start: mysql
# Should-Stop: mysql
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Control ZoneMinder as a Service
### END INIT INFO
# description: Control ZoneMinder as a Service
# chkconfig: 2345 20 20
# Source function library.
#. /etc/rc.d/init.d/functions
prog=ZoneMinder
ZM_PATH_BIN="/usr/bin"
RUNDIR=/var/run/zm
TMPDIR=/tmp/zm
command="$ZM_PATH_BIN/zmpkg.pl"
start() {
echo -n "Starting $prog: "
mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR
mkdir -p $TMPDIR && chown www-data:www-data $TMPDIR
$command start
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
echo
[ $RETVAL = 0 ] && touch /var/lock/zm
return $RETVAL
}
stop() {
echo -n "Stopping $prog: "
#
# Why is this status check being done?
# as $command stop returns 1 if zoneminder
# is stopped, which will result in
# this returning 1, which will stuff
# dpkg when it tries to stop zoneminder before
# uninstalling . . .
#
result=`$command status`
if [ ! "$result" = "running" ]; then
echo "Zoneminder already stopped"
echo
RETVAL=0
else
$command stop
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
echo
[ $RETVAL = 0 ] && rm -f /var/lock/zm
fi
}
status() {
result=`$command status`
if [ "$result" = "running" ]; then
echo "ZoneMinder is running"
RETVAL=0
else
echo "ZoneMinder is stopped"
RETVAL=1
fi
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart' | 'force-reload')
stop
start
;;
'status')
status
;;
*)
echo "Usage: $0 { start | stop | restart | status }"
RETVAL=1
;;
esac
exit $RETVAL

View File

@ -1,19 +0,0 @@
# ZoneMinder systemd unit file
# This file is intended to work with debian distributions
[Unit]
Description=ZoneMinder CCTV recording and security system
After=network.target mysql.service apache2.service
Requires=apache2.service
Wants=mysql.service
[Service]
User=www-data
Type=forking
ExecStart=/usr/bin/zmpkg.pl start
ExecReload=/usr/bin/zmpkg.pl restart
ExecStop=/usr/bin/zmpkg.pl stop
PIDFile=/var/run/zm/zm.pid
[Install]
WantedBy=multi-user.target

View File

@ -1 +0,0 @@
d /var/run/zm 0755 www-data www-data

View File

@ -1,142 +0,0 @@
#!/bin/sh
# config maintainer script for zoneminder
set -e
# Source the debconf stuff
. /usr/share/debconf/confmodule
# Set the first version in which dbconfig-common was introduced in the package
dbc_first_version="1.28.0"
CONFIGFILE=/etc/zm/zm.conf
if [ -e $CONFIGFILE ]; then
# Source the config file if exists
. $CONFIGFILE
elif [ -e ${CONFIGFILE}.dpkg-new ]; then
# If no config file, source the config file which is going to be installed
# by the core package
. ${CONFIGFILE}.dpkg-new
else
# If no config file is going to be installed, set some default values
ZM_DB_HOST=
ZM_DB_NAME="zm"
ZM_DB_USER="zmuser"
fi
# Set some variables for the dbconfig-common stuff
dbc_dbserver="$ZM_DB_HOST"
dbc_dbname="$ZM_DB_NAME"
dbc_dbuser="$ZM_DB_USER"
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
# Default use dbconfig-common
dbc_install="true"
# Currently we only support mysql database
dbc_dbtypes="mysql"
# Set authentication method to password
dbc_authmethod_user="password"
# Source the dbconfig-common stuff
. /usr/share/dbconfig-common/dpkg/config
fi
# Do this when the package is installed, upgraded or reconfigured
# Most of answers are cached so the questions will not be asked again
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
# Ask the user if the database shall be installed locally or remotely
db_input high zoneminder/debconf_dblocation || true
db_go || true
db_get zoneminder/debconf_dblocation
if [ "$RET" = "local" ]; then
if [ ! -e "/usr/sbin/mysqld" ]; then
# Display a message and exit if the user want a local database but
# no database server is available
db_input high zoneminder/debconf_dblocalmissingerror || true
db_go || true
exit 0
else
# Set the database server to localhost
dbc_dbserver="localhost"
fi
else
# Source the dbconfig main configuration file
if [ -f /etc/dbconfig-common/config ]; then
. /etc/dbconfig-common/config
fi
if [ "$dbc_remote_questions_default" = "false" ]; then
# Display a message and exit if the dbconfig configuration does not
# allow installation of remote databases
# Note: To overcome this issue, we could think to override the
# default setting by using dbc_remote_questions_default='true' in
# maintainer scripts but unfortunately this does not work due to
# current dbconfig design
# More information here:
# https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1065331
db_input high zoneminder/debconf_dbconfigerror || true
db_go || true
exit 0
fi
fi
# Ask the user for all database settings
dbc_go zoneminder $@
# Ask the user for the password of the database administrator if the user
# has not yet answered to this question.
# This situation may occur if the user skipped the database creation step
# when reconfiguring the package.
RET=""
db_get zoneminder/mysql/admin-pass
if [ -z "$RET" ]; then
db_input high zoneminder/mysql/admin-pass || true
db_go || true
fi
# Do this only when not upgrading the package (no old version in argument)
if [ -z "$2" ]; then
# Ask for the password of 'admin' user
while :; do
RET=""
db_input high zoneminder/admin_password || true
db_go || true
db_get zoneminder/admin_password
# If password isn't empty we ask for password verification
if [ -z "$RET" ]; then
db_fset zoneminder/admin_password seen false
db_fset zoneminder/admin_password_again seen false
break
fi
ROOT_PW="$RET"
db_input high zoneminder/admin_password_again || true
db_go || true
db_get zoneminder/admin_password_again
if [ "$RET" = "$ROOT_PW" ]; then
ROOT_PW=""
break
fi
db_fset zoneminder/password_mismatch seen false
db_input critical zoneminder/password_mismatch || true
db_set zoneminder/admin_password ""
db_set zoneminder/admin_password_again ""
db_go || true
done
else
# If we are upgrading the package, set an empty password to disable
# password update in ZoneMinder database
db_set zoneminder/admin_password ""
fi
# Set the seen flag to not ask this question again if no password is
# provided
db_fset zoneminder/admin_password seen true
fi
#DEBHELPER#
exit 0

View File

@ -1,3 +0,0 @@
usr/share/zoneminder/db
usr/share/dbconfig-common/data/zoneminder/install
usr/share/dbconfig-common/data/zoneminder/upgrade/mysql

View File

@ -1 +0,0 @@
usr/share/zoneminder/db

View File

@ -1,79 +0,0 @@
#! /bin/sh
# postinst maintainer script for zoneminder-db package
set -e
# Source the debconf stuff
. /usr/share/debconf/confmodule
mysql_update() {
# Source the dbconfig stuff
. /usr/share/dbconfig-common/internal/mysql
# Update the password of the hard-coded default 'admin' account
test -z $ADMIN_PASSWORD || dbc_mysql_exec_command "UPDATE Users SET Password = password('$ADMIN_PASSWORD') WHERE Username = 'admin';" || true
# Update the database version
dbc_mysql_exec_command "UPDATE Config SET Value = '$DB_VERSION' WHERE Name = 'ZM_DYN_DB_VERSION';" || true
}
if [ -f /usr/share/dbconfig-common/dpkg/postinst ]; then
# Set the first version in which dbconfig-common was introduced in the package
dbc_first_version="1.28.0"
# Set the database type
dbc_dbtypes="mysql"
# Source the dbconfig-common stuff
. /usr/share/dbconfig-common/dpkg/postinst
fi
# Do this when the package is installed, upgraded or reconfigured
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
# Install sql database create file for dbconfig
# (needed at first package installation)
if [ ! -f /usr/share/dbconfig-common/data/zoneminder/install/mysql ]; then
install -m 644 /usr/share/zoneminder/db/zm_create.sql \
/usr/share/dbconfig-common/data/zoneminder/install/mysql
# Remove unneeded sql requests
# dbconfig will create the underlying database
sed -i "/^ *CREATE DATABASE /d" \
/usr/share/dbconfig-common/data/zoneminder/install/mysql
sed -i "/^ *USE /d" \
/usr/share/dbconfig-common/data/zoneminder/install/mysql
fi
# Symlink sql update files for dbconfig (needed when upgrading the package)
for sqlfile in /usr/share/zoneminder/db/zm_update-*.sql; do
lnk=`echo $sqlfile | sed "s/^\/usr\/share\/zoneminder\/db\/zm_update-\(.*\)\.sql/\1/"`
if [ ! -L /usr/share/dbconfig-common/data/zoneminder/upgrade/mysql/$lnk ]; then
ln -sf $sqlfile \
/usr/share/dbconfig-common/data/zoneminder/upgrade/mysql/$lnk
fi
done || true
# Create the underlying database and populate it
# dbconfig will take care of applying any updates which are newer than the
# previously installed version
dbc_go zoneminder $@
# Get the password of ZoneMinder user 'admin' from debconf
db_get zoneminder/admin_password
ADMIN_PASSWORD=$RET
# Remove the password from debconf database
test -z $ADMIN_PASSWORD || db_reset zoneminder/admin_password || true
# Get the lastest database version from dbconfig upgrade folder
DB_VERSION=$(ls -rv /usr/share/dbconfig-common/data/zoneminder/upgrade/$dbc_dbtypes | head -1)
# Update the default admin account and database version
mysql_update
fi
#DEBHELPER#
exit 0

View File

@ -1,34 +0,0 @@
#! /bin/sh
# postrm maintainer script for zoneminder-db package
set -e
# Source the debconf stuff
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
# Source the dbconfig stuff
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
. /usr/share/dbconfig-common/dpkg/postrm
# Ask the user what do to with dbconfig when removing the package
dbc_go zoneminder $@
fi
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
# Remove dbconfig stuff added in postinst script
rm -rf /usr/share/dbconfig-common/data/zoneminder
# No need to manually remove the zm database, dbconfig take care of this
fi
if [ "$1" = "purge" ]; then
# Delete a potential remaining file used in postinst script
rm -f /etc/zm/zm.conf.postinst.bak
fi
#DEBHELPER#
# postrm rm may freeze without that
db_stop
exit 0

View File

@ -1,22 +0,0 @@
#!/bin/sh
# prerm script for zoneminder-db package
set -e
# Source the debconf stuff if file exists
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
# If dbconfig-common is installed and has been used by zoneminder
if [ -f /usr/share/dbconfig-common/dpkg/prerm ] \
&& [ -f /etc/dbconfig-common/zoneminder.conf ]; then
# Source the dbconfig stuff
. /usr/share/dbconfig-common/dpkg/prerm
# Ask the user what do to with dbconfig before removing the package
dbc_go zoneminder $@
fi
# #DEBHELPER#
exit 0

View File

@ -1,58 +0,0 @@
Template: zoneminder/debconf_dblocation
Type: select
__Choices: local, remote
Default: local
_Description: Database location:
A database server is required to run ZoneMinder. The database can be installed
either locally or remotely on a machine of your network.
.
If you choose a remote location, you will have to select the 'tcp/ip'
connection method and enter the hostname or ip address of the remote machine
in the next configuration screens.
Template: zoneminder/debconf_dblocalmissingerror
Type: error
_Description: No local database server is available:
Currently ZoneMinder supports mysql or mariadb database server but none of them
appears to be installed on this machine.
.
In order to complete ZoneMinder's installation, after ending of this assistant,
please install a compatible database server and then restart the assistant by
invoking:
.
$ sudo dpkg-reconfigure zoneminder
Template: zoneminder/debconf_dbconfigerror
Type: error
_Description: Remote database servers are not allowed:
The current configuration of dbconfig-common does not allow installation of
a database on remote servers.
.
In order to reconfigure dbconfig-common, please invoke the following command
after ending of this assistant:
.
$ sudo dpkg-reconfigure dbconfig-common
.
Then, to complete ZoneMinder's installation, please restart this assistant by
invoking:
.
$ sudo dpkg-reconfigure zoneminder
Template: zoneminder/admin_password
Type: password
_Description: New password for the ZoneMinder 'admin' user:
Please enter the password of the default administrative user.
.
While not mandatory, it is highly recommended that you set a custom password
for the administrative 'admin' user.
.
If this field is left blank, the password will not be changed.
Template: zoneminder/admin_password_again
Type: password
_Description: Repeat password for the ZoneMinder 'admin' user:
Template: zoneminder/password_mismatch
Type: error
_Description: Password input error
The two passwords you entered were not the same. Please try again.

View File

@ -1,20 +0,0 @@
#!/bin/sh
# config maintainer script for zoneminder-ui-base package
set -e
# Source the debconf stuff
. /usr/share/debconf/confmodule
# Do this when the package is installed, upgraded or reconfigured
# Most of answers are cached so the questions will not be asked again
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
# Ask the user for the web server(s) to configure
db_input high zoneminder/webserver || true
db_go || true
fi
#DEBHELPER#
exit 0

View File

@ -1,11 +0,0 @@
debian/apache.conf etc/zm
usr/lib/cgi-bin
usr/share/zoneminder/ajax
usr/share/zoneminder/css
usr/share/zoneminder/graphics
usr/share/zoneminder/includes
usr/share/zoneminder/index.php
usr/share/zoneminder/js
usr/share/zoneminder/lang
usr/share/zoneminder/tools
usr/share/zoneminder/views

View File

@ -1 +0,0 @@
usr/lib/cgi-bin usr/share/zoneminder/cgi-bin

View File

@ -1,48 +0,0 @@
#! /bin/sh
# postinst maintainer script for zoneminder-ui-base package
set -e
# Source the debconf stuff
. /usr/share/debconf/confmodule
apache_install() {
mkdir -p /etc/apache2/conf-available
ln -sf ../../zm/apache.conf /etc/apache2/conf-available/zoneminder.conf
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enconf zoneminder
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
[ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/zoneminder.conf ] && ln -s ../conf-available/zoneminder.conf /etc/apache2/conf.d/zoneminder.conf
fi
# Enable CGI script module in apache (not enabled by default on jessie)
a2enmod cgi >/dev/null 2>&1
# Reload the web server
deb-systemd-invoke reload apache2.service || true
}
# Do this when the package is installed, upgraded or reconfigured
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
# Configure the web server
db_get zoneminder/webserver
webservers="$RET"
for webserver in $webservers; do
webserver=${webserver%,}
# Currently we only support apache2
if [ "$webserver" = "apache2" ] ; then
apache_install $1
fi
done
fi
#DEBHELPER#
exit 0

View File

@ -1,41 +0,0 @@
#! /bin/sh
# postrm maintainer script for zoneminder-ui-base package
set -e
# Source the debconf stuff
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
apache_remove() {
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf zoneminder
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
rm -f /etc/apache2/conf.d/zoneminder.conf
fi
rm -f /etc/apache2/conf-available/zoneminder.conf
# Reload the web server
deb-systemd-invoke reload apache2.service || true
}
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
# Deconfigure the web server
db_get zoneminder/webserver
for webserver in $RET; do
webserver=${webserver%,}
# Currently we only support apache2
if [ "$webserver" = "apache2" ] ; then
apache_remove $1
fi
done
fi
#DEBHELPER#
# postrm rm may freeze without that
db_stop
exit 0

View File

@ -1,7 +0,0 @@
Template: zoneminder/webserver
Type: multiselect
Choices: apache2
Default: apache2
_Description: Web server to reconfigure automatically:
Please choose the web server that should be automatically configured for
ZoneMinder's web portal access.

View File

@ -1 +0,0 @@
usr/share/zoneminder/skins/classic

View File

@ -1 +0,0 @@
usr/share/zoneminder/skins/mobile

View File

@ -1 +0,0 @@
usr/share/zoneminder/skins/xml

View File

@ -33,6 +33,7 @@ Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apa
,libssl-dev
,libcrypt-eksblowfish-perl
,libdata-entropy-perl
,libvncserver-dev
# Unbundled (dh_linktree):
,libjs-jquery
,libjs-mootools
@ -82,6 +83,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
,libssl | libssl1.0.0 | libssl1.1
,libcrypt-eksblowfish-perl
,libdata-entropy-perl
,libvncclient1
Recommends: ${misc:Recommends}
,libapache2-mod-php5 | libapache2-mod-php | php5-fpm | php-fpm
,mysql-server | mariadb-server | virtual-mysql-server

10
distros/ubuntu2004/NEWS Normal file
View File

@ -0,0 +1,10 @@
zoneminder (1.28.1-1) unstable; urgency=low
This version is no longer automatically initialize or upgrade database.
See README.Debian for details.
Changed installation paths (please correct your web server configuration):
/usr/share/zoneminder --> /usr/share/zoneminder/www
/usr/lib/cgi-bin --> /usr/lib/zoneminder/cgi-bin
-- Dmitry Smirnov <onlyjob@debian.org> Tue, 31 Mar 2015 15:12:17 +1100

View File

@ -8,7 +8,7 @@ Initializing database
OR
cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf
echo 'grant lock tables,alter,create,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";'\
echo 'grant lock tables,alter,create,index,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";'\
| sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql
Hint: generate secure password with `pwgen` and update "/etc/zm/zm.conf"
@ -23,8 +23,7 @@ configuration file:
Upgrading database
------------------
Prior to 1.28.1 database upgrade was performed automatically.
"zoneminder" service will refuse to start with outdated database.
The database is updated automatically on installation. You should not need to take this step.
Assuming that database is on "localhost" then the following command can be
used to upgrade "zm" database:
@ -45,17 +44,11 @@ The following command prints the current version of zoneminder database:
Enabling service
----------------
By default Zoneminder service is not starting automatically and need to be
manually activated once database is configured:
On systemd:
By default Zoneminder service is not automatically started and needs to be
manually enabled once database is configured:
sudo systemctl enable zoneminder.service
On SysV:
sudo update-rc.d zoneminder enable
Web server set-up
-----------------
@ -82,10 +75,10 @@ Common configuration steps for Apache2:
## nginx / fcgiwrap
Nginx needs "php5-fpm" package to support PHP and "fcgiwrap" package
Nginx needs "php-fpm" package to support PHP and "fcgiwrap" package
for binary "cgi-bin" applications:
sudo apt-get install php5-fpm fcgiwrap
sudo apt-get install php-fpm fcgiwrap
To enable a URL alias that makes Zoneminder available from
@ -119,32 +112,9 @@ site configuration.
Changing the location for images and events
-------------------------------------------
Zoneminder, in its upstream form, stores data in /usr/share/zoneminder/. This
package modifies that by changing /usr/share/zoneminder/images and
/usr/share/zoneminder/events to symlinks to directories under
/var/cache/zoneminder.
There are numerous places these could be put and ways to do it. But, at the
moment, if you change this, an upgrade will fail with a warning about these
locations having changed (the reason for this was that previously, an upgrade
would silently revert the changes and cause event loss - refer
bug #608793).
If you do want to change the location, here are a couple of suggestions.
(thanks to vagrant@freegeek.org):
These lines in fstab could allow you to bind-mount an alternate location
/dev/sdX1 /otherdrive ext3 defaults 0 2
/otherdrive/zoneminder/images /var/cache/zoneminder/images bind defaults 0 2
/otherdrive/zoneminder/events /var/cache/zoneminder/events bind defaults 0 2
or if you have a separate partition for each:
/dev/sdX1 /var/cache/zoneminder/images ext3 defaults 0 2
/dev/sdX2 /var/cache/zoneminder/events ext3 defaults 0 2
-- Peter Howard <pjh@northern-ridge.com.au>, Sun, 16 Jan 2010 01:35:51 +1100
ZoneMinder is now able to be configured to use an alternative location for storing
events and images at compile time. This package makes use of that, so symlinks in
/usr/share/zoneminder/www are no longer necessary.
Access to /dev/video*
---------------------

View File

@ -0,0 +1,3 @@
zoneminder (1.31.39~20180223.27-stretch-1) unstable; urgency=low
*
-- Isaac Connor <iconnor@connortechnology.com> Fri, 23 Feb 2018 14:15:59 -0500

View File

@ -6,7 +6,8 @@ ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
Require all granted
</Directory>
# Order matters. This Alias must come first
# Order matters. This alias must come first.
Alias /zm/cache /var/cache/zoneminder/cache
<Directory /var/cache/zoneminder/cache>
Options -Indexes +FollowSymLinks
@ -24,7 +25,6 @@ Alias /zm/cache /var/cache/zoneminder/cache
Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
php_flag register_globals off
Options -Indexes +FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php

View File

@ -3,34 +3,39 @@ Section: net
Priority: optional
Maintainer: Isaac Connor <isaac@zoneminder.com>
Uploaders: Isaac Connor <isaac@zoneminder.com>
Build-Depends: debhelper (>= 9), python-sphinx | python3-sphinx, apache2-dev, dh-linktree
Build-Depends: debhelper, dh-systemd, python3-sphinx, dh-linktree, dh-systemd, dh-apache2
,cmake
,libx264-dev, libmp4v2-dev
,libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libavdevice-dev
,libavresample-dev
,libavdevice-dev
,libavcodec-dev
,libavformat-dev
,libavutil-dev
,libswresample-dev
,libswscale-dev
,ffmpeg
,net-tools
,libbz2-dev
,libgcrypt-dev
,libgcrypt20-dev
,libcurl4-gnutls-dev
,libgnutls-openssl-dev
,libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev,
,libmysqlclient-dev
,libturbojpeg0-dev
,default-libmysqlclient-dev | libmysqlclient-dev | libmariadbclient-dev-compat
,libpcre3-dev
,libpolkit-gobject-1-dev
,libv4l-dev (>= 0.8.3) [!hurd-any]
,libv4l-dev [!hurd-any]
,libvlc-dev
,libdate-manip-perl
,libdbd-mysql-perl
,libphp-serialization-perl
,libsys-mmap-perl [!hurd-any]
,libwww-perl
,libdata-uuid-perl
,libdata-uuid-perl
,libssl-dev
,libcrypt-eksblowfish-perl
,libdata-entropy-perl
# Unbundled (dh_linktree):
,libjs-jquery
,libjs-mootools
Standards-Version: 3.9.4
Standards-Version: 3.9.8
Homepage: http://www.zoneminder.com/
Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/zoneminder.git
Vcs-Git: git://anonscm.debian.org/collab-maint/zoneminder.git
@ -39,16 +44,15 @@ Package: zoneminder
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
,javascript-common
,libmp4v2-2, libx264-142
,libav-tools|ffmpeg
,libdate-manip-perl
,libmp4v2-2, libx264-155
,libswscale5
,libswresample4
,ffmpeg
,libdate-manip-perl, libmime-lite-perl, libmime-tools-perl
,libdbd-mysql-perl
,libmime-lite-perl
,libmime-tools-perl
,libphp-serialization-perl
,libmodule-load-conditional-perl
,libnet-sftp-foreign-perl
# ,libzoneminder-perl (= ${source:Version})
,libarchive-zip-perl
,libdbd-mysql-perl
,libdevice-serialport-perl
@ -56,27 +60,31 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
,libjson-maybexs-perl
,libsys-mmap-perl [!hurd-any]
,liburi-encode-perl
,libwww-perl
,libwww-perl, liburi-perl
,libdata-dump-perl
,libdatetime-perl
,libdata-uuid-perl
,libclass-std-fast-perl
,libsoap-wsdl-perl
,libio-socket-multicast-perl
,libdigest-sha-perl
,libsys-cpu-perl, libsys-meminfo-perl
,libdata-uuid-perl
,libnumber-bytes-human-perl
,libfile-slurp-perl
,mysql-client | virtual-mysql-client
,mysql-client | mariadb-client | virtual-mysql-client
,perl-modules
,php5-mysql, php5-gd, php5-apcu, php-apc
,php-mysql, php-gd, php-apcu, php-apc | php-apcu-bc, php-json
,policykit-1
,rsyslog | system-log-daemon
,zip
,libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl
,libio-socket-multicast-perl, libdigest-sha-perl
,libsys-cpu-perl, libsys-meminfo-perl
,libssl | libssl1.0.0
,libpcre3
,libcrypt-eksblowfish-perl
,libdata-entropy-perl
Recommends: ${misc:Recommends}
,libapache2-mod-php5 | php5-fpm
,mysql-server | virtual-mysql-server
,libapache2-mod-php | php-fpm
,mysql-server | mariadb-server | virtual-mysql-server
,zoneminder-doc (>= ${source:Version})
,ffmpeg
Suggests: fcgiwrap, logrotate
Description: video camera security and surveillance solution
ZoneMinder is intended for use in single or multi-camera video security
@ -122,7 +130,7 @@ Package: zoneminder-doc
Section: doc
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}, ${sphinxdoc:Depends}
Depends: ${misc:Depends}, ${sphinxdoc:Depends}, python-sphinx-rtd-theme | python3-sphinx-rtd-theme
Suggests: www-browser
Description: ZoneMinder documentation
ZoneMinder is intended for use in single or multi-camera video security

View File

@ -13,26 +13,26 @@ endif
%:
dh $@ --parallel --buildsystem=cmake --builddirectory=dbuild \
--with sphinxdoc,apache2,linktree
--with systemd,sphinxdoc,apache2,linktree
override_dh_auto_configure:
dh_auto_configure -- $(ARGS) \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DZM_CONFIG_DIR="/etc/zm" \
-DZM_CONFIG_SUBDIR="/etc/zm/conf.d" \
-DZM_RUNDIR="/var/run/zm" \
-DZM_SOCKDIR="/var/run/zm" \
-DZM_TMPDIR="/tmp/zm" \
-DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \
-DZM_CACHEDIR="/var/cache/zoneminder/cache" \
dh_auto_configure -- $(ARGS) \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DZM_CONFIG_DIR="/etc/zm" \
-DZM_CONFIG_SUBDIR="/etc/zm/conf.d" \
-DZM_RUNDIR="/var/run/zm" \
-DZM_SOCKDIR="/var/run/zm" \
-DZM_TMPDIR="/tmp/zm" \
-DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \
-DZM_CACHEDIR="/var/cache/zoneminder/cache" \
-DZM_DIR_EVENTS="/var/cache/zoneminder/events" \
-DZM_PATH_SHUTDOWN="/sbin/shutdown" \
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms"
-DZM_PATH_SHUTDOWN="/sbin/shutdown" \
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms"
override_dh_clean:
dh_clean $(MANPAGES1)
$(RM) -r docs/_build docs/installationguide
$(RM) -r docs/_build
build-indep:
#$(MAKE) -C docs text
@ -67,8 +67,11 @@ override_dh_fixperms:
chown root:www-data $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
chmod 640 $(CURDIR)/debian/zoneminder/etc/zm/zm.conf
override_dh_installinit:
dh_installinit --no-start
override_dh_systemd_start:
dh_systemd_start --no-start
override_dh_systemd_enable:
dh_systemd_enable --no-enable
override_dh_apache2:
dh_apache2 --noenable

View File

@ -5,5 +5,5 @@ var/cache/zoneminder/images
var/cache/zoneminder/temp
var/cache/zoneminder/cache
usr/share/zoneminder/db
etc/zm
etc/zm/
etc/zm/conf.d

View File

@ -0,0 +1 @@
/var/tmp /usr/share/zoneminder/www/api/app/tmp

View File

@ -1,4 +1,4 @@
/var/log/zm/*log {
/var/log/zm/*.log {
missingok
notifempty
sharedscripts

View File

@ -0,0 +1,90 @@
#! /bin/sh
set +e
if [ "$1" = "configure" ]; then
. /etc/zm/zm.conf
for CONFFILE in /etc/zm/conf.d/*.conf; do
. "$CONFFILE"
done
# The logs can contain passwords, etc... so by setting group root, only www-data can read them, not people in the www-data group
chown www-data:root /var/log/zm
chown www-data:www-data /var/lib/zm
if [ -z "$2" ]; then
chown www-data:www-data /var/cache/zoneminder /var/cache/zoneminder/*
fi
if [ ! -e "/etc/apache2/mods-enabled/cgi.load" ] && [ "$(command -v a2enmod)" != "" ]; then
echo "The cgi module is not enabled in apache2. I am enabling it using a2enmod cgi."
a2enmod cgi
fi
if [ "$ZM_DB_HOST" = "localhost" ]; then
if [ -e "/lib/systemd/system/mysql.service" ] || [ -e "/lib/systemd/system/mariadb.service" ] || [ -e "/etc/init.d/mysql" ]; then
# Ensure zoneminder is stopped
deb-systemd-invoke stop zoneminder.service || exit $?
#
# Get mysql started if it isn't running
#
if [ -e "/lib/systemd/system/mariadb.service" ]; then
DBSERVICE="mariadb.service"
else
DBSERVICE="mysql.service"
fi
echo "Detected db service is $DBSERVICE"
if systemctl is-failed --quiet $DBSERVICE; then
echo "$DBSERVICE is in a failed state; it will not be started."
echo "If you have already resolved the problem preventing $DBSERVICE from running,"
echo "run sudo systemctl restart $DBSERVICE then run sudo dpkg-reconfigure zoneminder."
exit 1
fi
if ! systemctl is-active --quiet mysql.service mariadb.service; then
# Due to /etc/init.d service autogeneration, mysql.service always returns the status of mariadb.service
# However, mariadb.service will not return the status of mysql.service.
deb-systemd-invoke start $DBSERVICE
fi
# Make sure systemctl status exit code is 0; i.e. the DB is running
if systemctl is-active --quiet "$DBSERVICE"; then
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
# test if database if already present...
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
echo "Creating zm db"
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
if [ $? -ne 0 ]; then
echo "Error creating db."
exit 1;
fi
# This creates the user.
echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost identified by \"${ZM_DB_PASS}\";" | mysql --defaults-file=/etc/mysql/debian.cnf mysql
else
echo "Updating permissions"
echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql
fi
zmupdate.pl --nointeractive
zmupdate.pl --nointeractive -f
# Add any new PTZ control configurations to the database (will not overwrite)
zmcamtool.pl --import >/dev/null 2>&1
echo "Done Updating; starting ZoneMinder."
else
echo 'NOTE: MySQL/MariaDB not running; please start mysql and run dpkg-reconfigure zoneminder when it is running.'
fi
else
echo 'MySQL/MariaDB not found; assuming remote server.'
fi
else
echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)."
fi
deb-systemd-invoke restart zoneminder.service
fi
#DEBHELPER#

View File

@ -0,0 +1,11 @@
#!/bin/sh
set -e
## Remove obsolete symlink which is in the way of dh_apache2:
ol="/etc/apache2/conf-available/zoneminder.conf"
if [ -h "${ol}" ]; then
[ "$(readlink ${ol})" = "/etc/zm/apache.conf" ] && rm -f "${ol}"
fi
#DEBHELPER#

View File

@ -13,7 +13,7 @@ Type=forking
ExecStart=/usr/bin/zmpkg.pl start
ExecReload=/usr/bin/zmpkg.pl restart
ExecStop=/usr/bin/zmpkg.pl stop
PIDFile=/var/run/zm/zm.pid
PIDFile=/run/zm/zm.pid
Restart=always
RestartSec=10
Environment=TZ=:/etc/localtime

View File

@ -0,0 +1,4 @@
d /run/zm 0755 www-data www-data
d /tmp/zm 0755 www-data www-data
d /var/tmp/zm 0755 www-data www-data
d /var/cache/zoneminder/cache 0755 www-data www-data

View File

@ -42,7 +42,7 @@ guide you with a quick search.
::
add-apt-repository ppa:iconnor/zoneminder-1.32
add-apt-repository ppa:iconnor/zoneminder-1.34
Update repo and upgrade.

View File

@ -14,13 +14,13 @@ LANG_DEFAULT - ZoneMinder allows the web interface to use languages other than E
OPT_USE_AUTH - ZoneMinder can run in two modes. The simplest is an entirely unauthenticated mode where anyone can access ZoneMinder and perform all tasks. This is most suitable for installations where the web server access is limited in other ways. The other mode enables user accounts with varying sets of permissions. Users must login or authenticate to access ZoneMinder and are limited by their defined permissions. Authenticated mode alone should not be relied up for securing Internet connected ZoneMinder.
AUTH_TYPE - ZoneMinder can use two methods to authenticate users when running in authenticated mode. The first is a builtin method where ZoneMinder provides facilities for users to log in and maintains track of their identity. The second method allows interworking with other methods such as http basic authentication which passes an independently authentication 'remote' user via http. In this case ZoneMinder would use the supplied user without additional authentication provided such a user is configured ion ZoneMinder.
AUTH_TYPE - ZoneMinder can use two methods to authenticate users when running in authenticated mode. The first is a builtin method where ZoneMinder provides facilities for users to log in and maintains track of their identity. The second method allows interworking with other methods such as http basic authentication which passes an independently authenticated 'remote' user via http. In this case ZoneMinder would use the supplied user without additional authentication provided such a user is configured in ZoneMinder.
AUTH_RELAY - When ZoneMinder is running in authenticated mode it can pass user details between the web pages and the back end processes. There are two methods for doing this. This first is to use a time limited hashed string which contains no direct username or password details, the second method is to pass the username and passwords around in plaintext. This method is not recommend except where you do not have the md5 libraries available on your system or you have a completely isolated system with no external access. You can also switch off authentication relaying if your system is isolated in other ways.
AUTH_HASH_SECRET - When ZoneMinder is running in hashed authenticated mode it is necessary to generate hashed strings containing encrypted sensitive information such as usernames and password. Although these string are reasonably secure the addition of a random secret increases security substantially. Note that if you are using the new token based APIs, then this field is mandatory with ZM 1.34 and above
AUTH_HASH_SECRET - When ZoneMinder is running in hashed authenticated mode it is necessary to generate hashed strings containing encrypted sensitive information such as usernames and passwords. Although these strings are reasonably secure the addition of a random secret increases security substantially. Note that if you are using the new token based APIs, then this field is mandatory with ZM 1.34 and above.
AUTH_HASH_IPS - When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermitent problems with authentication, switching this option off may help. It is recommended you keep this off if you use mobile apps like zmNinja over mobile carrier networks - several APNs change the IP very frequently which may result in authentication failure.
AUTH_HASH_IPS - When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermitent problems with authentication, switching this option off may help. It is recommended you keep this off if you use mobile apps like zmNinja over mobile carrier networks - several APNs change the IP very frequently which may result in authentication failures.
AUTH_HASH_TTL - Time before ZM auth will expire (does not apply to API tokens). The default has traditionally been 2 hours. A new hash will automatically be regenerated at half this value.
@ -34,11 +34,11 @@ OPT_USE_API - A global setting to enable/disable ZoneMinder APIs. If you are usi
OPT_USE_LEGACY_AUTH - Starting version 1.34.0, ZoneMinder uses a more secure Authentication mechanism using JWT tokens. Older versions used a less secure MD5 based auth hash. It is recommended you turn this off after you are sure you don't need it. If you are using a 3rd party app that relies on the older API auth mechanisms, you will have to update that app if you turn this off. Note that zmNinja 1.3.057 onwards supports the new token system.
OPT_USE_EVENT_NOTIFICATION - zmeventnotification is a 3rd party event notification server that is used to get notifications for alarms detected by ZoneMinder in real time. zmNinja requires this server for push notifications to mobile phones. This option only enables the server if its already installed. Please visit the `Event Notification Server project site <https://github.com/pliablepixels/zmeventserver>`__ for installation instructions.
OPT_USE_EVENT_NOTIFICATION - zmeventnotification is a 3rd party event notification server that is used to get notifications for alarms detected by ZoneMinder in real time. zmNinja requires this server for push notifications to mobile phones. This option only enables the server if it is already installed. Please visit the `Event Notification Server project site <https://github.com/pliablepixels/zmeventserver>`__ for installation instructions.
OPT_USE_GOOG_RECAPTCHA - This option allows you to include a google reCaptcha validation at login. This means in addition to providing a valid usernane and password, you will also have to pass the reCaptcha test. Please note that enabling this option results in the zoneminder login page reach out to google servers for captcha validation. Also please note that enabling this option may break 3rd party clients if they rely on web based logins (Note that zmNinja now uses the API based token method and will not be affected if reCAPTCHA is enabled). If you enable this, you also need to specify your site and secret key (please refer to context help in the ZoneMinder system screen)
OPT_USE_GOOG_RECAPTCHA - This option allows you to include a google reCaptcha validation at login. This means in addition to providing a valid username and password, you will also have to pass the reCaptcha test. Please note that enabling this option results in the zoneminder login page reaching out to google servers for captcha validation. Also please note that enabling this option may break 3rd party clients if they rely on web based logins (Note that zmNinja now uses the API based token method and will not be affected if reCAPTCHA is enabled). If you enable this, you also need to specify your site and secret key (please refer to context help in the ZoneMinder system screen).
SYSTEM_SHUTDOWN - this option decides if it is allowed to shutdown the full system via the ZM UI. The system will need to have sudo installed and the following added to /etc/sudoers:
SYSTEM_SHUTDOWN - this option puts a poweroff icon in the header of the ZM UI for users with System privilege accessi. This icon will allow the user to shutdown the full system via the ZM UI. The system will need to have sudo installed and the following added to /etc/sudoers:
::
@ -46,9 +46,9 @@ SYSTEM_SHUTDOWN - this option decides if it is allowed to shutdown the full syst
to perform the shutdown or reboot
OPT_FAST_DELETE - Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. **NOTE**: It is recommended that you keep this option OFF, unless you are running on an old or low-powered system.
OPT_FAST_DELETE - Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if youxr are trying to do a lot of events at once. **NOTE**: It is recommended that you keep this option OFF, unless you are running on an old or low-powered system.
FILTER_RELOAD_DELAY - ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be emailed, deleted or uploaded to a remote machine etc. The zmfilter daemon loads these and does the actual operation. This option determines how often in seconds the filters are reloaded from the database to get the latest versions or new filters. If you don't change filters very often this value can be set to a large value.
FILTER_RELOAD_DELAY - ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be emailed, deleted or uploaded to a remote machine etc. The zmfilter daemon loads these and does the actual operation. This option determines how often in seconds the filters are reloaded from the database to get the latest versions or new filters. If you don't change filters very often this value can be set to a large value. As of 1.34.0 filters should be automatically reloaded when saving a filter so this setting should have little effect.
FILTER_EXECUTE_INTERVAL - ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be emailed, deleted or uploaded to a remote machine etc. The zmfilter daemon loads these and does the actual operation. This option determines how often the filters are executed on the saved event in the database. If you want a rapid response to new events this should be a smaller value, however this may increase the overall load on the system and affect performance of other elements.
@ -58,9 +58,9 @@ STATUS_UPDATE_INTERVAL - The zmstats daemon performs various db queries related
WATCH_CHECK_INTERVAL - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinitely). This option determines how often the daemons are checked.
WATCH_MAX_DELAY - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinitely). This option determines the maximum delay to allow since the last captured frame. The daemon will be restarted if it has not captured any images after this period though the actual restart may take slightly longer in conjunction with the check interval value above.
WATCH_MAX_DELAY - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinitely). This option determines the maximum delay to allow since the last captured frame. The daemon will be restarted if it has not captured any images after this period though the actual restart may take slightly longer in conjunction with the check interval value above. Please note that some cameras can take up to 30 seconds to get a valid image, so this setting should be larger than that.
RUN_AUDIT - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. It is recommended you keep this **OFF** in most systems.
RUN_AUDIT - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. It is recommended you keep this **OFF** in most systems and run it manually if needed after a system crash.
AUDIT_CHECK_INTERVAL - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and filesystem may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.
@ -70,11 +70,11 @@ OPT_CONTROL - ZoneMinder includes limited support for controllable cameras. A nu
OPT_TRIGGERS - ZoneMinder can interact with external systems which prompt or cancel alarms. This is done via the zmtrigger.pl script. This option indicates whether you want to use these external triggers. Most people will say no here.
CHECK_FOR_UPDATES - From ZoneMinder version 1.17.0 onwards new versions are expected to be more frequent. To save checking manually for each new version ZoneMinder can check with the zoneminder.com website to determine the most recent release. These checks are infrequent, about once per week, and no personal or system information is transmitted other than your current version number. If you do not wish these checks to take place or your ZoneMinder system has no internet access you can switch these check off with this configuration variable
CHECK_FOR_UPDATES - To save checking manually for each new version ZoneMinder can check with the zoneminder.com website to determine the most recent release. These checks are infrequent, about once per week, and no personal or system information is transmitted other than your current version number. If you do not wish these checks to take place or your ZoneMinder system has no internet access you can switch these check off with this configuration variable.
TELEMETRY_DATA - Enable collection of usage information of the local system and send it to the ZoneMinder development team. This data will be used to determine things like who and where our customers are, how big their systems are, the underlying hardware and operating system, etc. This is being done for the sole purpose of creating a better product for our target audience. This script is intended to be completely transparent to the end user, and can be disabled from the web console under Options. For more details on what information we collect, please refer to Zoneminder's privacy statement (available in the contextual help of TELEMETRY_DATA on your installation).
UPDATE_CHECK_PROXY - If you use a proxy to access the internet then ZoneMinder needs to know so it can access zoneminder.com to check for updates. If you do use a proxy enter the full proxy url here in the form of ``http://<proxy host>:<proxy port>/``
UPDATE_CHECK_PROXY - If you use a proxy to access the internet then ZoneMinder needs to know so it can access zoneminder.com to check for updates. If you do use a proxy enter the full proxy url here in the form of ``http://<proxy host>:<proxy port>/``.
SHM_KEY - ZoneMinder uses shared memory to speed up communication between modules. To identify the right area to use shared memory keys are used. This option controls what the base key is, each monitor will have it's Id or'ed with this to get the actual key used. You will not normally need to change this value unless it clashes with another instance of ZoneMinder on the same machine. Only the first four hex digits are used, the lower four will be masked out and ignored.

View File

@ -46,243 +46,187 @@ use ZoneMinder::Config qw(:all);
use Time::HiRes qw( usleep );
sub new
{
my $class = shift;
my $id = shift;
my $self = ZoneMinder::Control->new( $id );
bless( $self, $class );
srand( time() );
return $self;
sub open {
my $self = shift;
$self->loadMonitor();
use LWP::UserAgent;
$self->{ua} = LWP::UserAgent->new;
$self->{ua}->agent('ZoneMinder Control Agent/' . ZoneMinder::Base::ZM_VERSION);
$self->{state} = 'open';
}
our $AUTOLOAD;
sub AUTOLOAD
{
my $self = shift;
my $class = ref($self) || croak( "$self not object" );
my $name = $AUTOLOAD;
$name =~ s/.*://;
if ( exists($self->{$name}) )
{
return( $self->{$name} );
}
Fatal( "Can't access $name member of object of class $class" );
sub close {
my $self = shift;
$self->{state} = 'closed';
}
sub open
{
my $self = shift;
sub sendCmd {
my $self = shift;
my $cmd = shift;
my $cgi = shift;
$self->loadMonitor();
my $result = undef;
use LWP::UserAgent;
$self->{ua} = LWP::UserAgent->new;
$self->{ua}->agent( "ZoneMinder Control Agent/" . ZoneMinder::Base::ZM_VERSION );
$self->{state} = 'open';
printMsg($cmd, 'Tx');
my $req = HTTP::Request->new( POST=>"http://$self->{Monitor}->{ControlAddress}/$cgi.cgi" );
$req->content($cmd);
my $res = $self->{ua}->request($req);
if ( $res->is_success ) {
$result = !undef;
} else {
Error("Error check failed: '".$res->status_line()."'");
}
return $result;
}
sub close
{
my $self = shift;
$self->{state} = 'closed';
sub move {
my $self = shift;
my $dir = shift;
my $panStep = shift;
my $tiltStep = shift;
my $cmd = "PanSingleMoveDegree=$panStep&TiltSingleMoveDegree=$tiltStep&PanTiltSingleMove=$dir";
$self->sendCmd($cmd, 'pantiltcontrol');
}
sub printMsg
{
my $self = shift;
my $msg = shift;
my $msg_len = length($msg);
Debug( $msg."[".$msg_len."]" );
sub moveRel {
my $self = shift;
my $params = shift;
my $panStep = $self->getParam($params, 'panstep', 0);
my $tiltStep = $self->getParam($params, 'tiltstep', 0);
my $dir = shift;
$self->move( $dir, $panStep, $tiltStep );
}
sub sendCmd
{
my $self = shift;
my $cmd = shift;
my $cgi = shift;
my $result = undef;
printMsg( $cmd, "Tx" );
my $req = HTTP::Request->new( POST=>"http://$self->{Monitor}->{ControlAddress}/$cgi.cgi" );
$req->content($cmd);
my $res = $self->{ua}->request($req);
if ( $res->is_success )
{
$result = !undef;
}
else
{
Error( "Error check failed: '".$res->status_line()."'" );
}
return( $result );
sub moveRelUpLeft {
my $self = shift;
my $params = shift;
$self->moveRel($params, 0);
}
sub move
{
my $self = shift;
my $dir = shift;
my $panStep = shift;
my $tiltStep = shift;
my $cmd = "PanSingleMoveDegree=$panStep&TiltSingleMoveDegree=$tiltStep&PanTiltSingleMove=$dir";
$self->sendCmd( $cmd, 'pantiltcontrol' );
sub moveRelUp {
my $self = shift;
my $params = shift;
$self->moveRel($params, 1);
}
sub moveRel
{
my $self = shift;
my $params = shift;
my $panStep = $self->getParam($params, 'panstep', 0);
my $tiltStep = $self->getParam($params, 'tiltstep', 0);
my $dir = shift;
$self->move( $dir, $panStep, $tiltStep );
sub moveRelUpRight {
my $self = shift;
my $params = shift;
$self->moveRel($params, 2);
}
sub moveRelUpLeft
{
my $self = shift;
my $params = shift;
$self->moveRel( $params, 0 );
sub moveRelLeft {
my $self = shift;
my $params = shift;
$self->moveRel($params, 3);
}
sub moveRelUp
{
my $self = shift;
my $params = shift;
$self->moveRel( $params, 1 );
sub moveRelRight {
my $self = shift;
my $params = shift;
$self->moveRel($params, 5);
}
sub moveRelUpRight
{
my $self = shift;
my $params = shift;
$self->moveRel( $params, 2 );
sub moveRelDownLeft {
my $self = shift;
my $params = shift;
$self->moveRel($params, 6);
}
sub moveRelLeft
{
my $self = shift;
my $params = shift;
$self->moveRel( $params, 3 );
sub moveRelDown {
my $self = shift;
my $params = shift;
$self->moveRel($params, 7);
}
sub moveRelRight
{
my $self = shift;
my $params = shift;
$self->moveRel( $params, 5 );
}
sub moveRelDownLeft
{
my $self = shift;
my $params = shift;
$self->moveRel( $params, 6 );
}
sub moveRelDown
{
my $self = shift;
my $params = shift;
$self->moveRel( $params, 7 );
}
sub moveRelDownRight
{
my $self = shift;
my $params = shift;
$self->moveRel( $params, 8 );
sub moveRelDownRight {
my $self = shift;
my $params = shift;
$self->moveRel($params, 8);
}
# moves the camera to center on the point that the user clicked on in the video image.
# This isn't extremely accurate but good enough for most purposes
sub moveMap
{
# if the camera moves too much or too little, try increasing or decreasing this value
my $f = 11;
sub moveMap {
# if the camera moves too much or too little, try increasing or decreasing this value
my $f = 11;
my $self = shift;
my $params = shift;
my $xcoord = $self->getParam( $params, 'xcoord' );
my $ycoord = $self->getParam( $params, 'ycoord' );
my $self = shift;
my $params = shift;
my $xcoord = $self->getParam( $params, 'xcoord' );
my $ycoord = $self->getParam( $params, 'ycoord' );
my $hor = $xcoord * 100 / $self->{Monitor}->{Width};
my $ver = $ycoord * 100 / $self->{Monitor}->{Height};
my $direction;
my $horSteps;
my $verSteps;
if ($hor < 50 && $ver < 50) {
# up left
$horSteps = (50 - $hor) / $f;
$verSteps = (50 - $ver) / $f;
$direction = 0;
} elsif ($hor >= 50 && $ver < 50) {
# up right
$horSteps = ($hor - 50) / $f;
$verSteps = (50 - $ver) / $f;
$direction = 2;
} elsif ($hor < 50 && $ver >= 50) {
# down left
$horSteps = (50 - $hor) / $f;
$verSteps = ($ver - 50) / $f;
$direction = 6;
} elsif ($hor >= 50 && $ver >= 50) {
# down right
$horSteps = ($hor - 50) / $f;
$verSteps = ($ver - 50) / $f;
$direction = 8;
}
my $v = int($verSteps + .5);
my $h = int($horSteps + .5);
Debug( "Move Map to $xcoord,$ycoord, hor=$h, ver=$v with direction $direction" );
$self->move( $direction, $h, $v );
my $hor = $xcoord * 100 / $self->{Monitor}->{Width};
my $ver = $ycoord * 100 / $self->{Monitor}->{Height};
my $direction;
my $horSteps;
my $verSteps;
if ($hor < 50 && $ver < 50) {
# up left
$horSteps = (50 - $hor) / $f;
$verSteps = (50 - $ver) / $f;
$direction = 0;
} elsif ($hor >= 50 && $ver < 50) {
# up right
$horSteps = ($hor - 50) / $f;
$verSteps = (50 - $ver) / $f;
$direction = 2;
} elsif ($hor < 50 && $ver >= 50) {
# down left
$horSteps = (50 - $hor) / $f;
$verSteps = ($ver - 50) / $f;
$direction = 6;
} elsif ($hor >= 50 && $ver >= 50) {
# down right
$horSteps = ($hor - 50) / $f;
$verSteps = ($ver - 50) / $f;
$direction = 8;
}
my $v = int($verSteps + .5);
my $h = int($horSteps + .5);
Debug("Move Map to $xcoord,$ycoord, hor=$h, ver=$v with direction $direction");
$self->move($direction, $h, $v);
}
sub presetClear
{
my $self = shift;
my $params = shift;
my $preset = $self->getParam( $params, 'preset' );
Debug( "Clear Preset $preset" );
my $cmd = "ClearPosition=$preset";
$self->sendCmd( $cmd, 'pantiltcontrol' );
sub presetClear {
my $self = shift;
my $params = shift;
my $preset = $self->getParam( $params, 'preset' );
Debug( "Clear Preset $preset" );
my $cmd = "ClearPosition=$preset";
$self->sendCmd( $cmd, 'pantiltcontrol' );
}
sub presetSet
{
my $self = shift;
my $params = shift;
my $preset = $self->getParam( $params, 'preset' );
Debug( "Set Preset $preset" );
my $cmd = "SetCurrentPosition=$preset&SetName=preset_$preset";
$self->sendCmd( $cmd, 'pantiltcontrol' );
sub presetSet {
my $self = shift;
my $params = shift;
my $preset = $self->getParam( $params, 'preset' );
Debug( "Set Preset $preset" );
my $cmd = "SetCurrentPosition=$preset&SetName=preset_$preset";
$self->sendCmd( $cmd, 'pantiltcontrol' );
}
sub presetGoto
{
my $self = shift;
my $params = shift;
my $preset = $self->getParam( $params, 'preset' );
Debug( "Goto Preset $preset" );
my $cmd = "PanTiltPresetPositionMove=$preset";
$self->sendCmd( $cmd, 'pantiltcontrol' );
sub presetGoto {
my $self = shift;
my $params = shift;
my $preset = $self->getParam( $params, 'preset' );
Debug( "Goto Preset $preset" );
my $cmd = "PanTiltPresetPositionMove=$preset";
$self->sendCmd( $cmd, 'pantiltcontrol' );
}
sub presetHome
{
my $self = shift;
Debug( "Home Preset" );
$self->move( 4, 0, 0 );
sub presetHome {
my $self = shift;
Debug( "Home Preset" );
$self->move( 4, 0, 0 );
}
# IR Controls
#
# wake = IR on
@ -290,40 +234,36 @@ sub presetHome
# reset = IR auto
sub setDayNightMode {
my $self = shift;
my $mode = shift;
my $cmd = "DayNightMode=$mode&ConfigReboot=No";
$self->sendCmd( $cmd, 'daynight' );
my $self = shift;
my $mode = shift;
my $cmd = "DayNightMode=$mode&ConfigReboot=No";
$self->sendCmd($cmd, 'daynight');
}
sub wake
{
my $self = shift;
Debug( "Wake - IR on" );
$self->setDayNightMode(2);
sub wake {
my $self = shift;
Debug('Wake - IR on');
$self->setDayNightMode(2);
}
sub sleep
{
my $self = shift;
Debug( "Sleep - IR off" );
$self->setDayNightMode(3);
sub sleep {
my $self = shift;
Debug('Sleep - IR off');
$self->setDayNightMode(3);
}
sub reset
{
my $self = shift;
Debug( "Reset - IR auto" );
$self->setDayNightMode(0);
sub reset {
my $self = shift;
Debug('Reset - IR auto');
$self->setDayNightMode(0);
}
1;
__END__
# Below is stub documentation for your module. You'd better edit it!
=head1 NAME
ZoneMinder::Database - Perl extension for DCS-5020L
ZoneMinder::Control::DCS5020L - Perl extension for DCS-5020L
=head1 SYNOPSIS
@ -351,6 +291,20 @@ Art Scheel <lt>ascheel (at) gmail<gt>
=head1 COPYRIGHT AND LICENSE
LGPLv3
Copyright (C) 2018 ZoneMinder LLC
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=cut

Some files were not shown because too many files have changed in this diff Show More