#! /bin/sh
#
# debian.postinst
#		Setup the module.
#
# Version:	debian.postinst  1.10  28-Nov-2000  miquels@cistron.nl
#

pkg=libapache-auth-radius
apa=/etc/apache

PATH=$PATH:/usr/bin/ssl

case "$1" in
	configure)
		oldver=$2
		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		exit 0
		;;
esac
umask 022

# Compatibility symlinks into /usr/doc
if [ -d /usr/doc -a ! -e /usr/doc/libapache-auth-radius \
        -a -d /usr/share/doc/libapache-auth-radius ]
then
        ln -sf ../share/doc/libapache-auth-radius /usr/doc/libapache-auth-radius
fi

#
#	See if we can enable radius_auth_module and mod_envif
#	Don't try too hard :)
#
if grep -q '^# *LoadModule *radius_auth_module' $apa/httpd.conf
then
	cp -a $apa/httpd.conf $apa/httpd.conf.0
	sed -e 's/^# *LoadModule *\(radius_auth_module.*\)$/LoadModule \1/' < $apa/httpd.conf.0 > $apa/httpd.conf
fi

exit 0
