2014-12-16 11:42:51 +00:00
|
|
|
#! /bin/sh
|
|
|
|
# postinst maintainer script for zoneminder-core package
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2014-12-18 10:03:54 +00:00
|
|
|
# Source the debconf stuff
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
|
|
|
|
# Source the config file if exists
|
|
|
|
CONFIGFILE=/etc/zm/zm.conf
|
|
|
|
if [ -e $CONFIGFILE ]; then
|
|
|
|
. $CONFIGFILE
|
|
|
|
fi
|
|
|
|
|
2014-12-16 11:42:51 +00:00
|
|
|
# Do this when the package is installed, upgraded or reconfigured
|
|
|
|
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
|
|
|
|
|
|
|
|
# Set some file permissions
|
|
|
|
chown $ZM_WEB_USER:$ZM_WEB_GROUP /var/log/zm
|
|
|
|
if [ -z "$2" ]; then
|
|
|
|
chown $ZM_WEB_USER:$ZM_WEB_GROUP -R /var/cache/zoneminder
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
exit 0
|