diff options
author | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2012-10-30 21:36:16 -0200 |
---|---|---|
committer | Márcio Alexandre Silva Delgado <coadde@lavabit.com> | 2012-10-30 21:36:16 -0200 |
commit | ade106c6633f8cc142ae3de92e2dc651fe0491fd (patch) | |
tree | 71f2d5a0adafafdf92b51f3d0f80711a3123c0eb /pcr/zoneminder | |
parent | ed68dfd7e006d795685ea7d7e934a2268339fffa (diff) |
zoneminder: fixing package
Diffstat (limited to 'pcr/zoneminder')
-rw-r--r-- | pcr/zoneminder/PKGBUILD | 5 | ||||
-rw-r--r-- | pcr/zoneminder/zoneminder.install | 20 |
2 files changed, 18 insertions, 7 deletions
diff --git a/pcr/zoneminder/PKGBUILD b/pcr/zoneminder/PKGBUILD index e5e54537b..a008bcc6c 100644 --- a/pcr/zoneminder/PKGBUILD +++ b/pcr/zoneminder/PKGBUILD @@ -8,7 +8,7 @@ pkgname=zoneminder pkgver=1.25.0 -pkgrel=20 +pkgrel=21 pkgdesc='Capture, analyse, record and monitor video security cameras' arch=( i686 @@ -187,9 +187,12 @@ package() { for i in events images temp; do mv $pkgdir/srv/http/$pkgname/$i $pkgdir/var/cache/$pkgname/$i ln -s /var/cache/$pkgname/$i $pkgdir/srv/http/$pkgname/$i + chown -h http.http $pkgdir/srv/http/$pkgname/$i done ln -s /srv/http/cgi-bin $pkgdir/srv/http/$pkgname + chown -h http.http $pkgdir/srv/http/{cgi-bin,$pkgname,$pkgname/cgi-bin} + ln -s /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$pkgname install -D -m 644 $srcdir/httpd-$pkgname.conf $pkgdir/etc/httpd/conf/extra diff --git a/pcr/zoneminder/zoneminder.install b/pcr/zoneminder/zoneminder.install index 899e2a5d1..ecacf6437 100644 --- a/pcr/zoneminder/zoneminder.install +++ b/pcr/zoneminder/zoneminder.install @@ -69,6 +69,9 @@ post_install() { /^open_basedir/ s/:\/srv\/http\/zoneminder//; /^open_basedir/ s/:\/srv\/http\/zoneminder\///; /^open_basedir/ s/$/:\/srv\/http\/zoneminder/; + /^open_basedir/ s/:\/var\/cache\/zoneminder//; + /^open_basedir/ s/:\/var\/cache\/zoneminder\///; + /^open_basedir/ s/$/:\/var\/cache\/zoneminder/; ' /etc/php/php.ini || read sed -i -e ' /^LoadModule php5_module modules\/libphp5.so/d; @@ -79,6 +82,7 @@ post_install() { /^Include \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/d; /^Include conf\/extra\/httpd-default.conf/ s/$/\n\n# PHP 5\n\Include \/etc\/httpd\/conf\/extra\/php5_module.conf\n\n# ZoneMinder\nInclude \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/; ' /etc/httpd/conf/httpd.conf || read + gpasswd -a http video cat << EOF Note for mysql: ==> To run Zoneminder, you must install the database running mysql service (as root): @@ -105,11 +109,11 @@ Note for php: ==> "extension=openssl.so" ==> "extension=ftp.so" ==> "extension=zip.so" -==> check and add to open_basedir "/etc" and -==> "/srv/http/zoneminder" like so -==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/srv/http/zoneminder" +==> check and add to open_basedir "/etc", +==> "/srv/http/zoneminder" and "/var/cache/zoneminder" like so +==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/srv/http/zoneminder:/var/cache/zoneminder" ==> and set your timezone in php.ini: -==> "date.timezone = <your_country>/<your_city>" +==> "date.timezone = <your_zone>/<your_city>" Note for apache: ==> You must edit /etc/httpd/conf/httpd.conf and add the line: @@ -132,6 +136,7 @@ post_remove() { sed -i -e ' /^open_basedir/ s/:\/srv\/http\/zoneminder//; /^open_basedir/ s/:\/srv\/http\/zoneminder\///; + /^open_basedir/ s/:\/var\/cache\/zoneminder\/// ' /etc/php/php.ini || read sed -i -e ' /^# ZoneMinder/d; @@ -165,9 +170,12 @@ Note: ==> "extension=mysqli.so" ==> "extension=session.so" ==> "extension=sockets.so" -==> "date.timezone = <my_country>/<my_city>" +==> "date.timezone = <my_zone>/<my_city>" -==> Edit /etc/php/php.ini and remove "/etc" and "/srv/http/zoneminder" +==> Drop http user on video group if it isn't needed with others servers: +==> gpasswd -d http video + +==> Edit /etc/php/php.ini and remove "/etc", "/srv/http/zoneminder" and "/var/cache/zoneminder" ==> in the "open_basedir". ==> Remove log files and "zonemider" directory in "/var/log/zoneminder". |