2015-05-25 04:01:51 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
abort=false
|
2015-10-09 19:45:19 +08:00
|
|
|
if [ -L /usr/share/zoneminder/www/events ]; then
|
|
|
|
l=$(readlink /usr/share/zoneminder/www/events)
|
|
|
|
if [ "$l" != "/var/cache/zoneminder/www/events" ]; then
|
2015-05-25 04:01:51 +08:00
|
|
|
abort=true
|
|
|
|
fi
|
|
|
|
fi
|
2015-10-09 19:45:19 +08:00
|
|
|
if [ -L /usr/share/zoneminder/www/images ]; then
|
|
|
|
l=$(readlink /usr/share/zoneminder/www/images )
|
|
|
|
if [ "$l" != "/var/cache/zoneminder/www/images" ]; then
|
2015-05-25 04:01:51 +08:00
|
|
|
abort=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$abort" = "true" ]; then
|
|
|
|
cat >&2 << EOF
|
|
|
|
Aborting installation of zoneminder due to non-default symlinks in
|
2015-10-09 19:45:19 +08:00
|
|
|
/usr/share/zoneminder/www for the images and/or events directory, which could
|
2015-05-25 04:01:51 +08:00
|
|
|
result in loss of data. Please move your data in each of these directories to
|
2015-10-09 19:45:19 +08:00
|
|
|
/var/cache/zoneminder/www before installing zoneminder from the package.
|
2015-05-25 04:01:51 +08:00
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
exit 0
|