summaryrefslogtreecommitdiffstats
path: root/abs/core/zoneminder/zoneminder.install
diff options
context:
space:
mode:
authorMichael Hanson <mihanson@linhes.org>2011-10-08 00:48:25 (GMT)
committerMichael Hanson <mihanson@linhes.org>2011-10-08 00:48:25 (GMT)
commitee019be570e80f20f106a6b0b739be427c5f89bc (patch)
tree47c56548770be52fc9a600f28eb4935844820f5b /abs/core/zoneminder/zoneminder.install
parentf37574bd879953f9c2c1ee1dc97577d804759895 (diff)
parent04949a18e6ea4a313d101911dcdc689d029ddcb1 (diff)
downloadlinhes_pkgbuild-ee019be570e80f20f106a6b0b739be427c5f89bc.zip
linhes_pkgbuild-ee019be570e80f20f106a6b0b739be427c5f89bc.tar.gz
linhes_pkgbuild-ee019be570e80f20f106a6b0b739be427c5f89bc.tar.bz2
Merge branch 'testing' of knoppmyth.net:linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/zoneminder/zoneminder.install')
-rwxr-xr-x[-rw-r--r--]abs/core/zoneminder/zoneminder.install82
1 files changed, 34 insertions, 48 deletions
diff --git a/abs/core/zoneminder/zoneminder.install b/abs/core/zoneminder/zoneminder.install
index 1f3cfc0..250749f 100644..100755
--- a/abs/core/zoneminder/zoneminder.install
+++ b/abs/core/zoneminder/zoneminder.install
@@ -1,69 +1,55 @@
# zoneminder.install
## arg 1: the new package version
-pre_install() {
- echo
-}
-
-## arg 1: the new package version
post_install() {
-chown http.http /data/srv/httpd/htdocs/zm/events
-chown http.http /data/srv/httpd/htdocs/zm/images
-chown http.http /data/srv/httpd/htdocs/zm/temp
-chown http.http /etc/zm.conf
-
-cat << EOF
+ ln -s /usr/share/cambozola/cambozola.jar /srv/zoneminder/www/
+ chown -R http.http /srv/zoneminder
+ chown http.http /etc/zm.conf
+ cat << EOF
Note:
-==> mythtv has been defined in /etc/zm.conf as user and password for
-==> The zoneminder (zm) database
==> To initialize the ZoneMinder database run (as root)
==> /usr/lib/zm/bin/zminit
-
EOF
-cat /etc/sysctl.conf |grep "kernel.shmall" >/dev/null || cat << EOF
-==> To raise the limit on shared memory for zoneminder
-==> add these lines to /etc/sysctl.conf
-==> kernel.shmall = 134217728
-==> kernel.shmmax = 134217728
+cat << EOF
+==> Check /etc/php/php.ini and make sure these are uncommented
+==> extension=gd.so
+==> extension=gettext.so
+==> extension=mcrypt.so
+==> extension=mysql.so
+==> extension=mysqli.so
+==> extension=session.so
+==> extension=sockets.so
+EOF
+cat << EOF
+==> Check /etc/php/php.ini and make sure short_open_tag = On
EOF
-[ -d /var/lib/zm ] || mkdir /var/lib/zm/
-touch /var/lib/zm/zm_backup.sql
-
-# Reuse the old config
-[ -f /etc/zm.conf.pacnew ] && cat /etc/zm.conf | sed -e "s/^ZM_VERSION=.*$/ZM_VERSION=1.23.3/" > /tmp/zm.conf
-[ -f /etc/zm.conf.pacsave ] && cat /etc/zm.conf.pacsave | sed -e "s/^ZM_VERSION=.*$/ZM_VERSION=1.23.3/" > /tmp/zm.conf
-[ -f /tmp/zm.conf ] && mv -f /tmp/zm.conf /etc/zm.conf && chown -R nobody.nobody /etc/zm.conf
+cat /etc/php/php.ini |grep "^open_basedir.*/etc/" | \
+grep "/var/lib/zm/www">/dev/null || cat << EOF
+==> You must edit /etc/php/php.ini and add to open_basedir "/etc/" and
+==> "/var/lib/zm/" like so
+==> open_basedir = /home/:/tmp/:/usr/share/pear/:/etc/:/var/lib/zm/
+==> Otherwise ZoneMinder will be unable to read /etc/zm.conf
+==> or display its own web directory
+EOF
+cat << EOF
+Note:
+==> You must edit /etc/httpd/conf/httpd.conf and uncomment/add the line
+==> LoadModule php5_module modules/libphp5.so
+==> You must also add these lines:
+==> Include conf/extra/php5_module.conf
+==> Include /etc/httpd/conf/extra/httpd-zm.conf
+EOF
+touch /var/lib/zm/zm_backup.sql
}
-## arg 1: the new package version
-## arg 2: the old package version
-pre_upgrade() {
- echo
-}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
-
- # Reuse the old config
-[ -f /etc/zm.conf.pacnew ] && cat /etc/zm.conf | sed -e "s/^ZM_VERSION=.*$/ZM_VERSION=1.23.3/" > /tmp/zm.conf
-[ -f /etc/zm.conf.pacsave ] && cat /etc/zm.conf.pacsave | sed -e "s/^ZM_VERSION=.*$/ZM_VERSION=1.23.3/" > /tmp/zm.conf
-[ -f /tmp/zm.conf ] && mv -f /tmp/zm.conf /etc/zm.conf && chown -R http.http /etc/zm.conf
-add_service.sh zm
-}
-## arg 1: the old package version
-pre_remove() {
- echo
+/usr/lib/zm/bin/zmupdate.pl -f >/dev/null
}
-
-## arg 1: the old package version
-post_remove() {
- echo
- remove_service.sh zm
-}
-
# vim:set ts=2 sw=2 et: