2014-11-26 05:09:55 +08:00
|
|
|
#!/bin/sh
|
2014-12-07 00:50:13 +08:00
|
|
|
# preinst maintainer script for zoneminder
|
2014-11-26 05:09:55 +08:00
|
|
|
|
2014-12-12 20:04:17 +08:00
|
|
|
set -e
|
2014-11-26 05:09:55 +08:00
|
|
|
|
|
|
|
abort=false
|
|
|
|
if [ -L /usr/share/zoneminder/events ]; then
|
|
|
|
l=$(readlink /usr/share/zoneminder/events)
|
|
|
|
if [ "$l" != "/var/cache/zoneminder/events" ]; then
|
|
|
|
abort=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ -L /usr/share/zoneminder/images ]; then
|
|
|
|
l=$(readlink /usr/share/zoneminder/images )
|
|
|
|
if [ "$l" != "/var/cache/zoneminder/images" ]; then
|
|
|
|
abort=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$abort" = "true" ]; then
|
2014-12-03 21:12:26 +08:00
|
|
|
cat >&2 << EOF
|
2014-11-26 05:09:55 +08:00
|
|
|
Aborting installation of zoneminder due to non-default symlinks in
|
|
|
|
/usr/share/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
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
exit 0
|