- # Remove configuration file generated by this CARNet package.
- if [ -f "$MODSECCONF" ]; then
- if egrep -q "^## Begin - Generated by CARNet package mod-security-cn$" "$MODSECCONF"; then
- cp_echo "CN: Removing configuration file ${MODSECCONF}."
- rm -f $MODSECCONF
- need_restart=1
+
+ # Disable ModSecurity configuration.
+ chk_conf_tag "$MODSECCONF"
+ if [ $RET -eq 0 ]; then
+ if [ -e "$CONFDIR/mod-security-cn.conf" ]; then
+ cp_echo "CN: Disabling ModSecurity configuration."
+ rm -f "$CONFDIR/mod-security-cn.conf"
+ need_restart=1
+ fi
+ fi
+
+ # Remove configuration files generated by this CARNet package.
+ for file in "$MODSECCONF" "$MODSECDIR/rbl_lookup.conf"; do
+ chk_conf_tag "$file"
+ if [ $RET -eq 0 ]; then
+ cp_echo "CN: Removing configuration file $file"
+ rm -f $file
+ need_restart=1