33 lines
790 B
Bash
Executable File
33 lines
790 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
abort=false
|
|
if [ -L /usr/share/zoneminder/www/events ]; then
|
|
l=$(readlink /usr/share/zoneminder/www/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" != "/var/cache/zoneminder/images" ]; then
|
|
abort=true
|
|
fi
|
|
fi
|
|
|
|
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
|
|
result in loss of data. Please move your data in each of these directories to
|
|
/var/cache/zoneminder/www before installing zoneminder from the package.
|
|
EOF
|
|
exit 1
|
|
|
|
fi
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|