zoneminder/distros/debian/postinst

21 lines
431 B
Bash

#! /bin/sh
set -e
VERSION=1.26.3
if [ "$1" = "configure" ]; then
if [ -z "$2" ]; then
chown www-data:www-data /var/log/zm
chown www-data:www-data /var/lib/zm/
chown www-data:www-data -R /var/cache/zoneminder
else
chown www-data:www-data /var/log/zm
OLD_ZM_VERSION=${2%-*}
if [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
zmupdate.pl --version $OLD_ZM_VERSION
fi
fi
fi
#DEBHELPER#