diff options
Diffstat (limited to 'pcr/zoneminder/zoneminder.install')
-rw-r--r-- | pcr/zoneminder/zoneminder.install | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/pcr/zoneminder/zoneminder.install b/pcr/zoneminder/zoneminder.install index 922aaad9b..5e62cc23e 100644 --- a/pcr/zoneminder/zoneminder.install +++ b/pcr/zoneminder/zoneminder.install @@ -1,14 +1,14 @@ pre_install() { set -e abort=false - if [ -L /usr/share/zoneminder/www/events ]; then - l=$(readlink /usr/share/zoneminder/www/events) + if [ -L /srv/http/zoneminder/events ]; then + l=$(readlink /srv/http/zoneminder/events) if [ $l != /var/cache/zoneminder/events ]; then abort=true fi fi - if [ -L /usr/share/zoneminder/www/images ]; then - l=$(readlink /usr/share/zoneminder/www/images ) + if [ -L /srv/http/zoneminder/images ]; then + l=$(readlink /srv/http/zoneminder/images ) if [ $l != /var/cache/zoneminder/images ]; then abort=true fi @@ -16,7 +16,7 @@ pre_install() { if [ $abort = true ]; then cat >&2 << EOF Aborting installation of zoneminder due to non-default symlinks in -/usr/share/zoneminder/www for the images and/or events directory, which could +/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 @@ -26,8 +26,13 @@ EOF } post_install() { - mkdir /usr/share/zoneminder/www/backup - mkdir /usr/share/zoneminder/www/socks + if [ -d /var/log/zoneminder ]; then + mkdir -m 0755 /var/log/zoneminder + chown http.http /var/log/zoneminder + else + chmod 0755 /var/log/zoneminder + chown http.http /var/log/zoneminder + fi cat << EOF Note: ==> To run Zoneminder, you must install the database running mysql service (as root): @@ -50,9 +55,10 @@ Note: ==> You must edit /etc/php/php.ini and add to open_basedir "/etc" and ==> "/usr/share/zoneminder" like so -==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/usr/share/zoneminder/www" +==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/srv/http/zoneminder" ==> Otherwise ZoneMinder will be unable to read /etc/zm.conf ==> or display its own web directory +==> And set your timezone in php.ini: date.timezone = <my_country>/<my_city> Note: ==> You must edit /etc/httpd/conf/httpd.conf and add the line: @@ -65,9 +71,22 @@ EOF post_upgrade() { /usr/bin/zmupdate.pl -f >/dev/null + if [ -d /var/log/zoneminder ]; then + mkdir -m 0755 /var/log/zoneminder + chown http.http /var/log/zoneminder + else + chmod 0755 /var/log/zoneminder + chown http.http /var/log/zoneminder + fi } post_remove() { + if [ -d /run/zoneminder ]; then + rm -vr /run/zoneminder + fi + if [ -d /tmp/zoneminder ]; then + rm -vr /tmp/zoneminder + fi cat << EOF Note: ==> To clean Zoneminder mysql database, run as root: @@ -79,6 +98,8 @@ Note: ==> 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 ==> "Include /etc/httpd/conf/extra/httpd-zm.conf" ==> Disable php with mysql if it isn't needed with others servers, @@ -90,8 +111,13 @@ Note: ==> "extension=mysqli.so" ==> "extension=session.so" ==> "extension=sockets.so" +==> "date.timezone = <my_country>/<my_city>" -==> edit /etc/php/php.ini and remove "/etc" and "/usr/share/zoneminder/www" +==> Edit /etc/php/php.ini and remove "/etc" and "/usr/share/zoneminder/www" ==> 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 } |