POSTIN
/bin/sh
if [ $1 = "1" ]; then
#We're in Install mode, add module to the config files
for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
if [ -x /usr/sbin/advxaddmod -a -e $config ]; then
/usr/sbin/advxaddmod $config \
extramodules/mod_auth_external.so mod_auth_external.c external_auth_module \
define=HAVE_AUTH_EXTERNAL addconf=conf/addon-modules/mod_auth_external.conf
fi
done
if [ -x /usr/sbin/AESctl ]; then /usr/sbin/AESctl update;fi
fi
if [ $1 -gt 1 ]; then
#We're in *upgrade mode*. Since we can't be sure the configuration files
#are sane, remove module from the conf files to clean them, re-add again
#in a way that the older module we're replacing won't try to erase (the
#post scripts were broken on some packages), and finally clean the module
#specific config file so it's compatible with the upgrade.
for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
if [ -x /usr/sbin/advxdelmod -a -e $config ]; then
/usr/sbin/advxdelmod $config \
extramodules/mod_auth_external.so mod_auth_external.c external_auth_module \
define=HAVE_AUTH_EXTERNAL addconf=conf/addon-modules/mod_auth_external.conf
fi
if [ -x /usr/sbin/advxaddmod -a -e $config ]; then
/usr/sbin/advxaddmod $config \
extramodules/mod_auth_external.so mod_auth_external.c external_auth_module \
define=HAVE_AUTH_EXTERNAL addconf=conf/addon-modules/mod_auth_external.conf
fi
done
if [ -x /usr/sbin/AESctl ]; then /usr/sbin/AESctl update;fi
fi
#### (cb) 02/02/05 This code was there before. I keep it in case of problems.
# for the NAAT configuration
#if [ -e /etc/httpd/conf/httpd.conf ]; then
#echo "Include conf/addon-modules/mod_auth_external.conf" >> /etc/httpd/conf/httpd.conf
#/usr/sbin/AESctl update; fi
POSTUN
/bin/sh
if [ $1 = "0" ]; then
for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
if [ -x /usr/sbin/advxdelmod -a -e $config ]; then
/usr/sbin/advxdelmod $config \
extramodules/mod_auth_external.so mod_auth_external.c external_auth_module \
define=HAVE_AUTH_EXTERNAL addconf=conf/addon-modules/mod_auth_external.conf
fi
done
if [ -x /usr/sbin/AESctl ]; then /usr/sbin/AESctl update;fi
fi
#### (cb) 02/02/05 This code was there before. I keep it in case of problems.
#if [ -e /etc/httpd/conf/httpd.conf ]; then
#/usr/bin/perl -pi -e "s|Include conf/addon-modules/mod_auth_external.conf\n||g;" \
# /etc/httpd/conf/httpd.conf
#/usr/sbin/AESctl update; fi