postinst is in libhtml-mason-perl 1:1.52-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/bin/bash
set -e
##
# Create mason data directory
case "$1" in
configure)
webuser=www-data
webgroup=www-data
# move old /var/lib/mason to /var/cache/mason
if [ -d /var/lib/mason -a ! -h /var/lib/mason ]
then
rm -rf /var/cache/mason
mv -i /var/lib/mason /var/cache/mason
ln -s /var/cache/mason /var/lib/mason
if [ ! -d /var/cache/mason/cache ]
then
mkdir /var/cache/mason/cache
fi
if [ ! -d /var/cache/mason/obj ]
then
mkdir /var/cache/mason/obj
fi
fi
# set permissions
if [ "`getent passwd $webuser`" -a "`getent group $webgroup `" ]
then
chown $webuser:$webgroup /var/cache/mason/cache /var/cache/mason/obj
chmod 0700 /var/cache/mason/cache /var/cache/mason/obj
fi
;;
esac
exit 0
|