summaryrefslogtreecommitdiffstats
path: root/abs/core/zoneminder/zoneminder.install
blob: 250749f2f6b756f899ae48ac6698cff669d45f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# zoneminder.install

## arg 1:  the new package version
post_install() {
  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:
==> To initialize the ZoneMinder database run (as root)
==> /usr/lib/zm/bin/zminit
EOF

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


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
post_upgrade() {
/usr/lib/zm/bin/zmupdate.pl -f >/dev/null
}
# vim:set ts=2 sw=2 et: