summaryrefslogtreecommitdiffstats
path: root/abs/core/zoneminder
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-12-23 15:05:13 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-12-23 15:05:13 (GMT)
commit0531c1844350eeef3dcf5d4ca3182628fc1e824c (patch)
tree7ce55b5566970cfdbe2f2fd161a0cea8d80b1316 /abs/core/zoneminder
parentac7c73deb19d5345f0b33f5c79f07b9fb12d0f2e (diff)
downloadlinhes_pkgbuild-0531c1844350eeef3dcf5d4ca3182628fc1e824c.zip
linhes_pkgbuild-0531c1844350eeef3dcf5d4ca3182628fc1e824c.tar.gz
linhes_pkgbuild-0531c1844350eeef3dcf5d4ca3182628fc1e824c.tar.bz2
zoneminder: .install adjustments. refs #985
Diffstat (limited to 'abs/core/zoneminder')
-rw-r--r--abs/core/zoneminder/PKGBUILD2
-rw-r--r--abs/core/zoneminder/__changelog1
-rw-r--r--abs/core/zoneminder/zoneminder.install80
3 files changed, 7 insertions, 76 deletions
diff --git a/abs/core/zoneminder/PKGBUILD b/abs/core/zoneminder/PKGBUILD
index 00f47a6..686ffb0 100644
--- a/abs/core/zoneminder/PKGBUILD
+++ b/abs/core/zoneminder/PKGBUILD
@@ -11,7 +11,7 @@
pkgbase=zoneminder
pkgname=zoneminder
pkgver=1.28.0
-pkgrel=3
+pkgrel=4
pkgdesc='Capture, analyse, record and monitor video security cameras'
arch=( i686 x86_64 mips64el arm )
diff --git a/abs/core/zoneminder/__changelog b/abs/core/zoneminder/__changelog
index 957bf36..8b30691 100644
--- a/abs/core/zoneminder/__changelog
+++ b/abs/core/zoneminder/__changelog
@@ -9,6 +9,7 @@ PKGBUILD: add zm_gen_light.conf
--
Install file
Removed modifications of php.ini
+Remove php and mysql notes
Added remove/add of zm.include in post install/remove
added install_db
add http to video group
diff --git a/abs/core/zoneminder/zoneminder.install b/abs/core/zoneminder/zoneminder.install
index b45cdaa..e074c32 100644
--- a/abs/core/zoneminder/zoneminder.install
+++ b/abs/core/zoneminder/zoneminder.install
@@ -18,14 +18,14 @@ install_db() {
pre_install() {
set -e
abort=false
- if [ -L /srv/http/zoneminder/events ]; then
- l=$(readlink /srv/http/zoneminder/events)
+ if [ -L /data/srv/http/zoneminder/events ]; then
+ l=$(readlink /data/srv/http/zoneminder/events)
if [ $l != /var/cache/zoneminder/events ]; then
abort=true
fi
fi
- if [ -L /srv/http/zoneminder/images ]; then
- l=$(readlink /srv/http/zoneminder/images)
+ if [ -L /data/srv/http/zoneminder/images ]; then
+ l=$(readlink /data/srv/http/zoneminder/images)
if [ $l != /var/cache/zoneminder/images ]; then
abort=true
fi
@@ -33,7 +33,7 @@ pre_install() {
if [ $abort = true ]; then
cat >&2 << EOF
Aborting installation of zoneminder due to non-default symlinks in
-/srv/http/zoneminder for the images and/or events directory, which could
+/data/srv/http/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
@@ -64,90 +64,20 @@ post_install() {
gen_light_include.py
/sbin/sv hup /service/lighttpd
#---
-
- cat << EOF
-Note for php:
-==> You must uncomment that line in /etc/php/php.ini:
-==> "extension=mysql.so"
-==> check and make sure these are uncommented:
-==> "extension=gd.so"
-==> "extension=gettext.so"
-==> "extension=mcrypt.so"
-==> "extension=mysqli.so"
-==> "extension=session.so"
-==> "extension=sockets.so"
-==> "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"
-==> and set your timezone in php.ini:
-==> "date.timezone = <your_country>/<your_city>"
-EOF
}
post_upgrade() {
post_install
/usr/bin/zmupdate.pl -f >/dev/null
- #---LinHES Stuff
- gen_light_include.py
- /sbin/sv hup /service/lighttpd
- #--
}
post_remove() {
if [[ -d /tmp/zoneminder ]]; then
rm -vr /tmp/zoneminder
fi
- # sed -i -e '
- # /^open_basedir/ s/:\/srv\/http\/zoneminder//;
- # /^open_basedir/ s/:\/srv\/http\/zoneminder\///;
- # ' /etc/php/php.ini || read
- # sed -i -e '
- # /^# ZoneMinder/d;
- # /Include \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/d;
- # ' /etc/httpd/conf/httpd.conf || read
#---LinHES Stuff
gen_light_include.py
/sbin/sv hup /service/lighttpd
#--
- cat << EOF
-Note:
-==> To clean Zoneminder mysql database, run as root (with password):
-==> "echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql"
-==> "echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql"
-==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zm"
-==> (or without password):
-==> "echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf mysql"
-==> "echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf mysql"
-==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm"
-
-==> Disable http with php if it isn't needed with others servers,
-==> comment or remove that lines in /etc/httpd/conf/httpd.conf:
-==> "LoadModule php5_module modules/libphp5.so"
-==> "Include /etc/httpd/conf/extra/php5_module.conf"
-
-==> Remove line in /etc/httpd/conf/httpd.conf:
-==> "Include /etc/httpd/conf/extra/httpd-zoneminder.conf"
-
-==> Disable php with mysql if it isn't needed with others servers,
-==> comment that lines in /etc/php/php.ini:
-==> "extension=mysql.so"
-==> "extension=gd.so"
-==> "extension=gettext.so"
-==> "extension=mcrypt.so"
-==> "extension=mysqli.so"
-==> "extension=session.so"
-==> "extension=sockets.so"
-==> "date.timezone = <my_country>/<my_city>"
-
-==> Edit /etc/php/php.ini and remove "/etc" and "/srv/http/zoneminder"
-==> in the "open_basedir".
-
-==> Remove log files and "zonemider" directory in "/var/log/zoneminder".
-
-==> Backup and remove "events", "images" and "temp" dirs in "/var/cache/zoneminder".
-EOF
}