Skip to content

Commit c0b3ed9

Browse files
author
gdt
committed
security/zoneminder: Update to 1.36.33
Note that this update brings some unresolved issues requiring manual attention, but a) that's just how zoneminder is and b) running 1.36 and dealing with the issues seems better than 1.30 with ancient php and 1.30's issues. The old version is in danger of being removed, so this is better... Significant packaging changes: + 1.36/1.34: - Switch to ffmpeg6 from ffmpeg2 - gc many workarounds that are no longer necessary + 1.32: - Change config to etc/zm from etc, and provide etc/zm/conf.d, because migration from 1.30 writes there. - Rototill hard the cmake build options, and try to document what must be set as path configuration. - Depend on mp4v2. Upstream NEWS: Generally, 1.X.0 is a significant release, and 1.X.Y, Y>0, are bugfixes and minor improvements. + 1.36 (The Memory Remains): Filters Moved event email options from global config to per Filter Added user to run filter as, so that users without access to certain monitors can't just use a filter to access them. Filters now have PreSQL and PostSQL conditions. The first Post SQL condition is ExistsInFileSystem. This can be used to cleanup after a crash instead of using zmaudit. warnings on Filter edit page when you create a filter than can delete archived events. Added Auto Unarchive function UI Updates bootstrap updated to version 3 removed mootools events list now uses bootstrap-table to enable a more modern powerful ui scaled thumbnail on mouseover on events list thumbnails with scaling on console frames view updates to include stats information many popups turned into modals monitor edit is now a full view instead of popup Zone edit is now scaled so high res cameras don't take the entire screen or more. Added Estimated RAM use to Buffers tab in Monitors. Monitor edit no longer form submits/reloads between tabs it just hides/unhides tabs using bootstrap nav. Monitors can now have Latitude/Longitude associated and displayed on a map General New Monitor type VNC for recording desktops better use of scaling when streaming to reduce bandwidth/cpu use dynamic loading of vlc, curl and other libraries that might not be used. Saves ram ONVIF probe can now select a network to scan Sessions now stored in database Event Summary tables reorganized to improve locking performance Clicking on username in header will now list other logged in users if you have SystemView permission. ZoneMinder will now try other Storage Areas if it can't create the event in the assigned area. New Monitor Setting: Decoding Enabled/Disabled /dev/shm mmap use decoupled from image buffering. You should set ImageBufferCount to 3 or larger. mp4v2 deprecated and removed. zma process has been turned into a thread of zmc. Added second ffmpeg input stream for when audio is coming from another source. added RTSP re-streaming hwaccel encoding support for intel vaapi and nvenc Use onmousedown/onmouseup for PTZ start/stop in PTZ controls. Amcrest is the only Protocol that supports it so far. + 1.34 (My Friend Of Misery): This is largely a fixes & polish release. There are a number of bug fixes and security improvements in here. Upgrading from 1.32.3 should be relatively painless although if your Logs table is large it may take some time to update it. Security fixes: We no longer store passwords using mysql's built-in password encryption. We now support a modern JWT access token system Replaced a lot of inline javascript. There were a number of XSS and SQL injection issues fixed. CVE-2019-13072 CVE-2019-6777 Other changes: When adding a new monitor a random colour will be assigned to it instead of red. We now have a handy resolution dropdown to help prevent typos in the width & height fields Support for mysql8 Support for php 7.4 Can now delete database log entries for the logs popup Timezone setting moved from php.ini to Options -> System ffmpeg hwaccel support for h264 decoding Improved recording to mp4 with audio Added ZM_LOG_FFMPEG options which captures ffmpeg debug messages properly which can really help with debugging. Added ability to use zms to stream mjpeg when the video is stored as h265. Most browsers can't play h265 so this allows you to use passthrough mode with an h265 camera and still watch the video. Filters now have a Copy To action which copies the event files to a second storage area We now display additional event information such as that generated by event server object detection + 1.32 - A re-worked web console, compared to the previous 1.30.4 release - record to mp4 container - record audio - support for php 7.x - Arbitrary website as a non-recordable, interactive monitor. - Updated Montage Review - Options-> Paths moved into config files under conf.d folder - Multiple storage paths are supported. See Options -> Storage - The old method of bind mounting the event folder is no longer needed nor recommended - Additional system statistics on the web console - Raspberry pi OMX hardware h264 decoder support - Event thumbnails play video on mouseover - Drag and drop sorting of monitors - Scalability improvements Upstream upgrade notes (tweaked for pkgsrc): - The upgrade scripts will take longer than normal to run, especially if you have many events. - Your previous settings on the Options -> Paths tab have been moved into the file zmcustom.conf which is found under ${PKGSYSCONFDIR}/etc/zm/conf.d - Consider migrating your events folder from the former bind mount method to the new method under Options -> Storage - You should no longer have symbolic links in your webroot folder. This resolves a long standing security issue. - The Apache config file has changed. Hand merge it and review your web setup.
1 parent cc010fc commit c0b3ed9

37 files changed

Lines changed: 1568 additions & 1019 deletions

security/zoneminder/Makefile

Lines changed: 207 additions & 200 deletions
Large diffs are not rendered by default.

security/zoneminder/PLIST

Lines changed: 652 additions & 157 deletions
Large diffs are not rendered by default.

security/zoneminder/distinfo

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
$NetBSD: distinfo,v 1.20 2022/09/27 01:20:39 gdt Exp $
1+
$NetBSD: distinfo,v 1.21 2024/12/01 13:49:47 gdt Exp $
22

3-
BLAKE2s (FriendsOfCake-crud-v3.0.10.tar.gz) = e04238f274c6ce5b27f4a106630ef224fe6cb61a8172d32474e8660af7adea81
4-
SHA512 (FriendsOfCake-crud-v3.0.10.tar.gz) = 2f60557f2c783bb448e06c1ca40b536a1d7d5f3caf0626fa6716a28f808492d4799e238f16c022571be96921105b074b6763920fd7b9cc77b76d17ceadae2040
5-
Size (FriendsOfCake-crud-v3.0.10.tar.gz) = 72960 bytes
6-
BLAKE2s (ZoneMinder-1.30.5.tar.gz) = eae68bdd260feaf529154de3173805dd318c7bc22ca0a76341f330d04d06bf1b
7-
SHA512 (ZoneMinder-1.30.5.tar.gz) = f423b79726357c277814c9346445b695fc1b0f9cff61847003d6286bc36f92aab8ab35689e1a3552fb60394793c478fefb4c8fa3861a1dd06a2655b018c6a52a
8-
Size (ZoneMinder-1.30.5.tar.gz) = 9936584 bytes
9-
SHA1 (patch-CMakeLists.txt) = 4cf38ed2818c2000863c4b6587c5b5f64b0c1127
10-
SHA1 (patch-cmake_Modules_Pod2Man.cmake) = f0a1462037fc63fa9f35d0595f4f50946f5518e7
11-
SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_ConfigData.pm.in) = b8f508abcd5451da73092070a302b99d1fd59def
12-
SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm) = bded373e318cd074b92853165d5ca38d23bdea5f
13-
SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_Memory_Shared.pm) = b97c104f6ac102fc4510eb0977169375cdd97197
3+
BLAKE2s (FriendsOfCake-crud-14292374ccf1328f2d5db20897bd06f99ba4d938.tar.gz) = 8877bf6718ecfe3cba2515629418fe5addc60cf8ce4650526b39db6a234922ad
4+
SHA512 (FriendsOfCake-crud-14292374ccf1328f2d5db20897bd06f99ba4d938.tar.gz) = da58528686baf05385ad08079f965bce10eba6d599133ab773e9ab1f9e4b7d82cf5431b4b773317b90effb16e0b026a029bdfabe08a9ef1a5e9b94e7a1c2ea9e
5+
Size (FriendsOfCake-crud-14292374ccf1328f2d5db20897bd06f99ba4d938.tar.gz) = 73086 bytes
6+
BLAKE2s (ZoneMinder-1.36.33.tar.gz) = 693d5a07ce03b6e97fd402170e05cc89cf2885a9a33215fc66e8615a12e90802
7+
SHA512 (ZoneMinder-1.36.33.tar.gz) = 7afd25d3fa5dd170bad552332dab5425b664e41d430f1514f2b038ec7391dae6fab165050b541cad50a6904341f77605fde845cc02e4d7ee10f42650cb9e8707
8+
Size (ZoneMinder-1.36.33.tar.gz) = 11501221 bytes
9+
BLAKE2s (ZoneMinder-CakePHP-Enum-Behavior-ea90c0cd7f6e24333a90885e563b5d30b793db29.tar.gz) = 4639184438becb1c33450a00e213fca9d11e92b7f2545fb701f40a664c716764
10+
SHA512 (ZoneMinder-CakePHP-Enum-Behavior-ea90c0cd7f6e24333a90885e563b5d30b793db29.tar.gz) = 75f2188e548b98191c8df82fb76e918f3bda9788f541449df8fa92449ad19aa0b9c13420dd91c760e08a4d31956ad51602242ab97e3bd4460f01e99f49992453
11+
Size (ZoneMinder-CakePHP-Enum-Behavior-ea90c0cd7f6e24333a90885e563b5d30b793db29.tar.gz) = 3504 bytes
12+
BLAKE2s (ZoneMinder-RtspServer-055d81fe1293429e496b19104a9ed3360755a440.tar.gz) = 0feba45357a746173378193be365b164061cc9f20e84210ecfe9e991ad9971e4
13+
SHA512 (ZoneMinder-RtspServer-055d81fe1293429e496b19104a9ed3360755a440.tar.gz) = 2f3bbd449269cba5afda3135e54cca114342956da3ce8fbfb05533ec7b1c3f75767d8b5f3d9b415254ad7b39817bc343b0790c591ef3cc64d2863819ab3a7551
14+
Size (ZoneMinder-RtspServer-055d81fe1293429e496b19104a9ed3360755a440.tar.gz) = 1396623 bytes
15+
SHA1 (patch-CMakeLists.txt) = dca040058ec7b389474dff9853c46f65fd5626da
16+
SHA1 (patch-dep_RtspServer_src_net_EventLoop.cpp) = bf1fe79c2ba1d602adf8895f29f61f7b961eece3
17+
SHA1 (patch-dep_RtspServer_src_net_Socket.h) = 789e90da4bfc15d6d43d942718538385cb6dfade
18+
SHA1 (patch-dep_RtspServer_src_net_SocketUtil.cpp) = c566652e8e7985a705682ef960118615b6777288
19+
SHA1 (patch-dep_RtspServer_src_xop_rtsp.h) = 20a014ce423d19549976c2158d39c46ea6892647
20+
SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_ConfigData.pm.in) = 3bf4e5e8276a682695db640e6608dd14c7315320
21+
SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm) = 996670d8a659c0624587da73f8083d9349aaa1ba
22+
SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_Memory_Shared.pm) = b3de55618915fad3d9263954db71270c800ad6f1
1423
SHA1 (patch-scripts_zm_in) = a05727261bb8be6b707e9a14ae4ff52ea3770d51
15-
SHA1 (patch-scripts_zmpkg_pl_in) = 04f30a02ad5132a58c5396bbf5dbb92280eddb8f
16-
SHA1 (patch-src_zm__event.cpp) = 5908b0fd1390505d851172b1f6f449f1c48f7fde
17-
SHA1 (patch-src_zm__monitor.cpp) = f690dae0adee48faeb94a393ca22f1ec49e8331e
18-
SHA1 (patch-src_zm__rtp__ctrl.h) = 4e0fd8e80932de8d77b3386a356cc026ddc23113
19-
SHA1 (patch-src_zm__rtp__source.cpp) = 039257e76768df2e32a5550625ba7f8d1cb9ba26
20-
SHA1 (patch-src_zm__thread.h) = 8ac734f991c74a8744f7ee7015e583a701517951
21-
SHA1 (patch-src_zm__timer.h) = d91d41ef987fa4cc67d6f55c25afc581ef3a273f
22-
SHA1 (patch-src_zm__utils.cpp) = d5012fb54b0a91640fa49a16daf7c5f0eb54228e
23-
SHA1 (patch-src_zm__utils.h) = 4ffb7eafa8602076766fd4ae00be797866a229d9
24-
SHA1 (patch-src_zm_comms_cpp) = bd3c3e6dd4d11ea0845d2da662e99169cd6e6680
25-
SHA1 (patch-src_zm_comms_h) = 64c0a8e98f9ac551113f3428dafff12a61ea9afe
26-
SHA1 (patch-src_zm_logger_cpp) = 3ad97a499643d9af5bbd1f86d9b4101bc24be4df
27-
SHA1 (patch-src_zm_remote_camera_h) = 0d4bd7dae0188df7e463586250ac2ed530230f3d
28-
SHA1 (patch-src_zm_signal_cpp) = 6863c33f22d40fd9dabdab7ba7056d56fae9d418
29-
SHA1 (patch-src_zm_thread_cpp) = 3d59ce545ee5ce16417b635e4b963867f4e15741
30-
SHA1 (patch-src_zmc_cpp) = 925a6fa9ab28b54b5ba0bc5fd657a16c1e59d46e
31-
SHA1 (patch-src_zmf.cpp) = 73affd763e7f37109e607cc6474fb8e87f783bdf
32-
SHA1 (patch-src_zmu.cpp) = a238a58cf383e847b69031ec06c929c960cafc6e
33-
SHA1 (patch-web_ajax_stream_php) = e8f811e63bedec03345b74db72c3d8014b3cc7f6
24+
SHA1 (patch-scripts_zmpkg_pl_in) = eb3166ae3cd9bb0ce1b828b64722506aa4e82368
25+
SHA1 (patch-src_zm__event.cpp) = 2831f586f140f682dd107a1adb09531c388a1df8
26+
SHA1 (patch-src_zm__eventstream.cpp) = d2134edf09f142a6a545ca36d3263b13defcadd6
27+
SHA1 (patch-src_zm__monitor.cpp) = ac6eb821d5d72455b46165e74ea1d321faf9e431
28+
SHA1 (patch-src_zm__packet.h) = 96951004741f3d21434d3ca981f6214c07f77c88
29+
SHA1 (patch-src_zm__rtp__source.cpp) = 288b32cff869103b04e96487b92bb12533b29772
30+
SHA1 (patch-src_zm__utils.cpp) = e16ffd3f41bd05a32c80142e7246307df12801a8
31+
SHA1 (patch-src_zm_comms_h) = 33577ab0eac62eadc415fe6fb970b82eb473c8e7
32+
SHA1 (patch-src_zm_logger_cpp) = 1d3d2a6baef1abe762ede06aaf393e5bc2e2080e
33+
SHA1 (patch-src_zm_remote_camera_h) = 2f774924338b9e42e7bcaa1701af72861ea62c22
34+
SHA1 (patch-src_zm_signal_cpp) = af9625702518648b8d62ed20d0d52c1a2a27841a
35+
SHA1 (patch-src_zmu.cpp) = e5d92c9aa17c3a9e8b53c2cbd43712d80c76ab4e
Lines changed: 137 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,160 @@
1-
===========================================================================
2-
$NetBSD: README-pkgsrc.md,v 1.1 2022/09/27 01:20:39 gdt Exp $
1+
# Introduction
32

4-
Performance:
3+
This is a local pkgsrc README for the zoneminder package. It attempts
4+
not to duplicate the upstream documentation. (Arguably, some of this
5+
should be pushed upstream.) This REAMDE presumes familiarity with
6+
zoneminder, adminstering a web server, adminstering mysql, and
7+
hand-typing SQL UPDATE statements.
58

6-
ZoneMinder benefits dramatically from using libjpeg-turbo. Consider
7-
building from Pkgsrc with:
9+
We write /var for ${VARBASE}, /usr/pkg for ${PREFIX}, and /usr/pkg/etc
10+
for ${PKG_SYSCONFDIR}, without loss of generality.
811

9-
JPEG_DEFAULT=libjpeg-turbo
12+
# pkgsrc-specific notes
1013

14+
## Choice of jpeg implementation
1115

12-
To get ZoneMinder started a MySQL database is required.
16+
ZoneMinder claims to benefit dramatically from using libjpeg-turbo.
17+
Consider setting that as default in mk.conf
18+
`JPEG_DEFAULT=libjpeg-turbo` and then *everything*.
1319

14-
First, create a MySQL user "zmuser":
20+
## User and Group
1521

16-
echo "create user 'zmuser'@'localhost' identified by 'zmpass';" | mysql -u root
22+
zoneminder uses APACHE_USER and APACHE_GROUP. These are www by
23+
default, but people set them to fpm for use with nginx and php_fpm.
24+
It is important that apache, zoneminder, and any existing directories
25+
all agree.
1726

18-
The default password is "zmpass". You may change this to something else, and
19-
update ZM_DB_PASS in ${PKG_SYSCONFDIR}/zm.conf.
27+
# MySQL configuration and initial database creation
2028

29+
(It seems that zoneminder only works with MySQL.)
2130

22-
Create the initial database via:
31+
Condider adding `bind-address=127.0.0.1` to `etc/my.conf`, if you are
32+
using mysql only for zoneminder and do not want it accessible from the
33+
network.
2334

24-
mysql -u root < ${PREFIX}/share/zoneminder/db/zm_create.sql
35+
See upstream instructions at
36+
https://zoneminder.readthedocs.io/en/1.32.3/installationguide/ubuntu.html
37+
which are for Ubuntu, but seem mostly generic.
2538

39+
Specifically, see "Step 5: Configure the ZoneMinder Database".
2640

27-
Assign rights to the "zmuser" user via:
41+
The default password is "zmpass". You may (probably should) change
42+
this to something else, and set ZM_DB_PASS in
43+
e.g. /usr/pkg/etc/zm/zmpass.conf.
2844

29-
echo "grant all on * to 'zmuser';" | mysql -u root zm
45+
# Other setup
3046

47+
See "Step 6: Set permissions", and use APACHE_GROUP.
48+
49+
See "Step 9: Edit Timezone in PHP". Otherwise, access to streams will
50+
fail. See https://github.com/ZoneMinder/ZoneMinder/issues/1552 for
51+
more information.
52+
53+
# Web setup
54+
55+
## apache
56+
57+
See "Step 7: Configure Apache correctly", but edit the apache config
58+
file instead of using the not-in-pkgsrc a2enmod command.
59+
60+
mod_cgid is a hard requirement. zm appears to work without rewrite
61+
and expire. headers is default on. Enabling a zoneminder apache
62+
module does not make sense, but upstream maybe implies that you
63+
should.
64+
65+
For now One needs to use prefork instead of event with cgid, because
66+
php is built without threads.
67+
68+
Zoneminder installs
69+
/usr/pkg/share/examples/zoneminder/apache/httpd-zoneminder.conf,
70+
which does two things:
71+
- aliases /zm to the zm main dir and /zm/cgi-bin/ to the zm cgi directory
72+
- allows those paths to 127.0.0.1
73+
Either `Include` this, copy/modify and `Include`, or insert into
74+
httpd.conf. (You will need to adjust the IP acl if you want
75+
off-machine access.)
76+
77+
It is for future study to use www/ap2-fcgid instead of mod_cgid, and
78+
then one could use the event MPM.
79+
80+
## nginx
81+
82+
After you figure it out, please send patches to add an nginx config
83+
file. Likely one would use php_fpm; Makefile guesses so.
84+
85+
# Problems not clearly attributed
86+
87+
In theory `zmpkg.pl start` should start everything. In practice, the
88+
first `zmdc.pl start` invocation does start the daemon but then fails
89+
to exit, hanging the startup process. While there is an attempt to
90+
avoid this in `zmpkg.pl`, it is likely necessary to kill the hanging
91+
start script, and thus to write a script to do so, to enable reliable
92+
starting. This is likely an upstream issue, to be debugged after
93+
pkgsrc is up to date.
94+
95+
# Upgrading from previous versions
96+
97+
As always, backup everything, diff all configs from upstream before
98+
and minimize, save deltas, and merge to new upstreams keeping intended
99+
changes. This is going to be worse than most upgrades.
100+
101+
## Standard zoneminder advice
31102

32103
Upgrade a database from an older version of ZoneMinder via:
33104

34105
zmupdate.pl -u root [-p <password>]
35106

107+
NB: Zoneminder 1.32 will attempt to remove config from the database
108+
and place it in e.g. `/usr/pkg/etc/zm/conf.d/zmcustom.conf`. The
109+
package attempts to create the directory, but make one more backup
110+
than you think you need.
111+
112+
## Zoneminder path woes
113+
114+
In theory, one wouldn't have to set paths, but it seems one does. Go
115+
over the list at
116+
https://github.com/ZoneMinder/zoneminder/blob/release-1.32/INSTALL and
117+
set some.
118+
119+
Probably, see (or create) conf.d/zmpaths.conf.
120+
121+
## Issues due to pkgsrc changes from 1.30 to 1.32
122+
123+
pkgsrc changed the config dir from /usr/pkg/etc to /usr/pkg/etc/zm, so
124+
you should move zm.conf.
125+
126+
When editing in conf.d, beware zmcustom.conf~ which might or might not
127+
also be read.
128+
129+
pkgsrc changed from /var/cache/zoneminder to /var/db/zoneminder.
130+
While merging configs, pay extra attention to stray /var/cache
131+
pathnames.
132+
133+
### Storage
134+
135+
Zoneminder has "Storage" configured (Options, Storage), and it is
136+
possible that it used to be /var/cache/zoneminder/events and should
137+
now be /var/db/zoneminder/events.
138+
139+
### Upload temp dir
140+
141+
One can configure uploads and a temp dir in which to create them.
142+
That path is in the database as UPLOAD_LOC_DIR and can be a stray
143+
source of /var/cache/zoneminder.
144+
145+
# Shared memory
146+
147+
Zoneminder tries to use a shm filesystem to store files that are then
148+
mmap'd. (1.28 used SysV shm but that is no longer relevant.)
36149

37-
To enable the web interface via Apache, add the following line to httpd.conf:
150+
On NetBSD, the compiled default might be /dev/shm but the right place
151+
is /var/shm. This can be changed in zmcustom.conf via ZM_PATH_MAP.
38152

39-
Include ${PREFIX}/share/examples/zoneminder/apache/zoneminder.conf
153+
(One might need a lot of space, or to turn the buffer down to fewer
154+
frames; this is not about pkgsrc.)
40155

41-
PHP may log warnings if the PHP date.timezone configuration is not set.
42-
Consider assigning a default system time zone to date.timezone in
43-
${PKG_SYSCONFDIR}/php.ini.
44-
===========================================================================
156+
Somtimes, the shm file can get into a bad state and be zero length.
157+
This might be a bad error path during camera timeouts; it seems to
158+
happen more with bad wifi connections. Turning up the timeouts in the
159+
config (e.g. wait 10s or 30s before giving up instead of 2s) probably
160+
also helps. This is also not about pkgsrc.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# pkgsrc Apache configuration for zoneminder, intended to be copied to
2+
# ${PKG_SYSCONFDIR}/httpd and then included via
3+
# Include etc/httpd/httpd-zoneminder.conf
4+
5+
# This configuration puts ZoneMinder under /zm. Access is limited to
6+
# localhost, as a safe default until intentionally changed.
7+
8+
LoadModule cgid_module lib/httpd/mod_cgid.so
9+
# \todo Consider fcgi intead.
10+
# <IfModule mod_fcgid.c>
11+
# <Directory /usr/share/zoneminder/www>
12+
# Options -Indexes +ExecCGI
13+
# AllowOverride All
14+
# AddHandler fcgid-script .php
15+
# FCGIWrapper /usr/bin/php5-cgi
16+
# Order allow,deny
17+
# Allow from all
18+
# </Directory>
19+
# </IfModule>
20+
21+
LoadModule php7_module lib/httpd/mod_php7.so
22+
<FilesMatch \.php$>
23+
SetHandler application/x-httpd-php
24+
</FilesMatch>
25+
26+
# Upstream had
27+
# <IfModule mod_php5.c>
28+
# <Directory /usr/share/zoneminder/www>
29+
# Options -Indexes +FollowSymLinks
30+
# <IfModule mod_dir.c>
31+
# DirectoryIndex index.php
32+
# </IfModule>
33+
# </Directory>
34+
# </IfModule>
35+
36+
ScriptAlias /zm/cgi-bin/ "@ZM_HTTPD_CGIBIN@/"
37+
<Directory "@ZM_HTTPD_CGIBIN@">
38+
<RequireAny>
39+
Require ip 127.0.0.1
40+
Require ip ::
41+
</RequireAny>
42+
</Directory>
43+
44+
Alias /zm/cache "/var/cache/zoneminder"
45+
<Directory "/var/cache/zoneminder">
46+
<RequireAny>
47+
Require ip 127.0.0.1
48+
Require ip ::
49+
</RequireAny>
50+
</Directory>
51+
52+
Alias /zm/events "/var/db/zoneminder/events"
53+
Alias /zm/images "/var/db/zoneminder/images"
54+
<Directory "/var/db/zoneminder">
55+
<RequireAny>
56+
Require ip 127.0.0.1
57+
Require ip ::
58+
</RequireAny>
59+
</Directory>
60+
61+
# \todo Upstream sets Options.
62+
Alias /zm "@ZM_HTTPD_ROOT@"
63+
<Directory "@ZM_HTTPD_ROOT@">
64+
DirectoryIndex index.php
65+
<RequireAny>
66+
Require ip 127.0.0.1
67+
Require ip ::
68+
</RequireAny>
69+
</Directory>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
3+
# On startup, there is a hang (not understood). This script attempts
4+
# to identify and kill any such hung processes. The normal process
5+
# supervision restarts it, and it seems the second time it doesn't
6+
# hang.
7+
8+
while sleep 60; do
9+
pids=`ps uaxw | egrep 'zmdc.pl start ' | egrep -v egrep | awk '{print $2}'`
10+
if [ "$pids" != "" ]; then
11+
logger "$0: found $pids"
12+
sleep 10
13+
for p in $pids; do
14+
if kill -0 $p 2> /dev/null; then
15+
logger "$0: pid $p still alive"
16+
kill $p
17+
fi
18+
done
19+
fi
20+
done

0 commit comments

Comments
 (0)