- if [ -d $docroot ]; then
- if [ "x$(echo ${docroot}/*)" = "x${docroot}/index.html" ]; then
- if [ "$(wc -l ${docroot}/index.html | awk '{print $1}')" -eq 1 ]; then
-
- cp_echo "CN: Removing document root directory ${docroot}."
- rm -f $docroot/index.html
- rmdir $docroot || true
- fi
- fi
- fi
- done
- fi
-
- # Remove CARNet specific configuration.
- if [ -d "$CONFDIR/conf.d" ] && [ -n "$(ls ${CONFDIR}/conf.d/)" ]; then
- cp_echo "CN: Disabling CARNet specific configuration."
- for file in /etc/apache2/conf.d/*; do
- if egrep -q "^## Begin - Generated by CARNet package apache2-cn$" $file; then
- rm -f $file
- fi
- done
- fi
+# Configuration generated by this CARNet package.
+echo "CN: Purging $PKG configuration for Apache2."
+purge_conf site ${CONFDIR}/sites-available
+purge_conf conf ${CONFDIR}/conf-available