postinst is in libapache2-mod-webauth 4.7.0-3build1.
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 | #! /bin/sh
set -e
# Make sure that /var/lib/webauth exists and is writable by the www-data
# group, since this is where the keyring and service token cache will go.
if [ ! -d /var/lib/webauth ] ; then
mkdir /var/lib/webauth
fi
chgrp www-data /var/lib/webauth
chmod 770 /var/lib/webauth
# On upgrade from versions prior to 4.6.0-2, ensure the keyring is owned by
# www-data if it was owned by root. Earlier versions of WebAuth updated the
# keyring during Apache configuration and therefore created it owned by root,
# but keyring handling is now done in the child processes, so those keyrings
# would no longer be readable.
if [ "$1" = 'configure' ] && [ -f '/var/lib/webauth/keyring' ] ; then
if [ -n "$2" ] && dpkg --compare-versions "$2" lt 4.6.0-2~ ; then
if [ "$(stat -c '%U' /var/lib/webauth/keyring)" = 'root' ] ; then
chown www-data:www-data /var/lib/webauth/keyring
fi
fi
fi
# dh_apache2 -e currently doesn't add code to restart Apache when a module
# that isn't enabled by default was enabled and is upgraded. (#710463) This
# code is somewhat odd since the cleanest way to restart Apache on upgrade is
# to invoke the enmod action, but we must not do that unless the module is
# already enabled.
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
if a2query -q -m webauth ; then
apache2_invoke enmod webauth
fi
fi
exit 0
|