summaryrefslogtreecommitdiffstats
path: root/abs/core/zoneminder/zoneminder.install
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/zoneminder/zoneminder.install
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/zoneminder/zoneminder.install')
-rw-r--r--abs/core/zoneminder/zoneminder.install69
1 files changed, 69 insertions, 0 deletions
diff --git a/abs/core/zoneminder/zoneminder.install b/abs/core/zoneminder/zoneminder.install
new file mode 100644
index 0000000..1f3cfc0
--- /dev/null
+++ b/abs/core/zoneminder/zoneminder.install
@@ -0,0 +1,69 @@
+# 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
+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
+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
+
+}
+
+## 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
+}
+
+## arg 1: the old package version
+post_remove() {
+ echo
+ remove_service.sh zm
+}
+
+# vim:set ts=2 sw=2 et: