add www-misc/zoneminder & dependancies
new file: dev-perl/Data-Entropy/Data-Entropy-0.7.0-r1.ebuild new file: dev-perl/Data-Entropy/Manifest new file: dev-perl/Data-Entropy/metadata.xml new file: dev-perl/HTTP-Lite/HTTP-Lite-2.44.ebuild new file: dev-perl/HTTP-Lite/Manifest new file: dev-perl/HTTP-Lite/metadata.xml new file: dev-perl/X10/Manifest new file: dev-perl/X10/X10-0.04.ebuild new file: dev-perl/X10/metadata.xml new file: www-misc/zoneminder/Manifest new file: www-misc/zoneminder/files/10_zoneminder.conf new file: www-misc/zoneminder/files/README.gentoo new file: www-misc/zoneminder/files/conf.d new file: www-misc/zoneminder/files/init.d new file: www-misc/zoneminder/files/zoneminder-1.36.18-semaphore.patch new file: www-misc/zoneminder/files/zoneminder.service new file: www-misc/zoneminder/metadata.xml new file: www-misc/zoneminder/zoneminder-1.36.19.ebuild new file: www-misc/zoneminder/zoneminder-1.36.20.ebuild new file: www-misc/zoneminder/zoneminder-1.36.21.ebuild new file: www-misc/zoneminder/zoneminder-1.36.23.ebuild new file: www-misc/zoneminder/zoneminder-1.36.24.ebuild new file: www-misc/zoneminder/zoneminder-9999.ebuild
This commit is contained in:
52
www-misc/zoneminder/files/10_zoneminder.conf
Normal file
52
www-misc/zoneminder/files/10_zoneminder.conf
Normal file
@ -0,0 +1,52 @@
|
||||
# Remember to enable cgi mod (i.e. "a2enmod cgi").
|
||||
ScriptAlias /zm/cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms"
|
||||
ScriptAlias /zm/cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms"
|
||||
|
||||
<Directory "/usr/libexec/zoneminder/cgi-bin">
|
||||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
|
||||
# Order matters. This alias must come first.
|
||||
Alias /zm/cache "/var/cache/zoneminder"
|
||||
<Directory "/var/cache/zoneminder">
|
||||
Options -Indexes +FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
Alias /zoneminder "%ZM_WEBDIR%"
|
||||
Alias /zm "%ZM_WEBDIR%"
|
||||
<Directory "%ZM_WEBDIR%">
|
||||
Options -Indexes +FollowSymLinks
|
||||
DirectoryIndex index.php
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# For better visibility, the following directives have been migrated from the
|
||||
# default .htaccess files included with the CakePHP project.
|
||||
# Parameters not set here are inherited from the parent directive above.
|
||||
<Directory "/usr/share/zoneminder/www/api">
|
||||
RewriteEngine on
|
||||
RewriteRule ^$ app/webroot/ [L]
|
||||
RewriteRule (.*) app/webroot/$1 [L]
|
||||
RewriteBase /zm/api
|
||||
</Directory>
|
||||
|
||||
<Directory "/usr/share/zoneminder/www/api/app">
|
||||
RewriteEngine on
|
||||
RewriteRule ^$ webroot/ [L]
|
||||
RewriteRule (.*) webroot/$1 [L]
|
||||
RewriteBase /zm/api
|
||||
</Directory>
|
||||
|
||||
<Directory "/usr/share/zoneminder/www/api/app/webroot">
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
RewriteBase /zm/api
|
||||
</Directory>
|
33
www-misc/zoneminder/files/README.gentoo
Normal file
33
www-misc/zoneminder/files/README.gentoo
Normal file
@ -0,0 +1,33 @@
|
||||
New Installation:
|
||||
1. If this is a new installation, you will need to create a MySQL
|
||||
database for zoneminder to use
|
||||
(see https://wiki.gentoo.org/wiki/MySQL/Startup_Guide).
|
||||
E.g., when logged into mysql as root,
|
||||
mysql> CREATE DATABASE zm;
|
||||
mysql> grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';
|
||||
mysql> flush privileges;
|
||||
Once you completed that you should execute the following:
|
||||
mysql -p < /usr/share/zoneminder/db/zm_create.sql
|
||||
|
||||
2. Set your database settings in /etc/zm/conf.d/99-local.conf, including above zmpass
|
||||
ZM_DB_USER=zmuser
|
||||
ZM_DB_PASS=zmpass
|
||||
|
||||
3. Verify zoneminder apache configuration /etc/apache2/vhosts.d/10_zoneminder.conf
|
||||
for an example configuration snippet.
|
||||
bzcat /usr/share/doc/zoneminder*/10_zoneminder.conf.bz2
|
||||
|
||||
4. Enable PHP in your webserver configuration /etc/conf.d/apache2
|
||||
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP -D PROXY"
|
||||
|
||||
5. set date.timezone in /etc/php/apache2-php*/php.ini
|
||||
and restart/reload the webserver.
|
||||
|
||||
6. Start the zoneminder daemon:
|
||||
/etc/init.d/zoneminder start
|
||||
|
||||
7. Finally point your browser to http://your.webserver/zm
|
||||
|
||||
|
||||
Upgrading:
|
||||
You will need to run the zmupdate.pl script
|
6
www-misc/zoneminder/files/conf.d
Normal file
6
www-misc/zoneminder/files/conf.d
Normal file
@ -0,0 +1,6 @@
|
||||
ZM_SCRIPT=/usr/bin/zmpkg.pl
|
||||
|
||||
# Commands for starting and stopping the server
|
||||
|
||||
CMD_START="${ZM_SCRIPT} start"
|
||||
CMD_STOP="${ZM_SCRIPT} stop"
|
26
www-misc/zoneminder/files/init.d
Normal file
26
www-misc/zoneminder/files/init.d
Normal file
@ -0,0 +1,26 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
depend() {
|
||||
use mysql
|
||||
need apache2
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -m 0775 -o apache:apache /var/run/zm
|
||||
checkpath -d -m 0775 -o apache:apache /var/tmp/zm
|
||||
checkpath -d -m 0775 -o apache:apache /var/cache/zoneminder
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting zoneminder"
|
||||
${CMD_START}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping zoneminder"
|
||||
${CMD_STOP}
|
||||
eend $?
|
||||
}
|
18
www-misc/zoneminder/files/zoneminder-1.36.18-semaphore.patch
Normal file
18
www-misc/zoneminder/files/zoneminder-1.36.18-semaphore.patch
Normal file
@ -0,0 +1,18 @@
|
||||
# semaphore retry introduced boolean issue breaking playback controls
|
||||
#
|
||||
# https://forums.zoneminder.com/viewtopic.php?p=126747
|
||||
# https://forums.zoneminder.com/viewtopic.php?p=126747
|
||||
|
||||
diff --git a/web/ajax/stream.php b/web/ajax/stream.php
|
||||
index 02b78b238..3eff34fc8 100644
|
||||
--- a/web/ajax/stream.php
|
||||
+++ b/web/ajax/stream.php
|
||||
@@ -25,7 +25,7 @@ while ( $semaphore_tries ) {
|
||||
usleep(100000);
|
||||
$semaphore_tries -= 1;
|
||||
}
|
||||
-if ($have_semaphore) {
|
||||
+if ($have_semaphore !== false) {
|
||||
if ( !($socket = @socket_create(AF_UNIX, SOCK_DGRAM, 0)) ) {
|
||||
ajaxError('socket_create() failed: '.socket_strerror(socket_last_error()));
|
||||
}
|
11
www-misc/zoneminder/files/zoneminder.service
Normal file
11
www-misc/zoneminder/files/zoneminder.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Video Security and Survellance System
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/zmpkg.pl start
|
||||
ExecReload=/usr/bin/zmpkg.pl reload
|
||||
PIDFile=/run/zm/zm.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user