-case "$1" in
- remove|deconfigure)
-
- # Include CARNet functions.
- . /usr/share/carnet-tools/functions.sh
-
- PKG="mod-security-cn"
- A2DIR="/etc/apache2"
- CONFDIR="$A2DIR/conf.d"
- MODSECDIR="$A2DIR/mod-security"
- MODSECCONF="$MODSECDIR/mod-security-cn.conf"
-
- need_restart=0
-
-
- # 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
- fi
+ modsecurity_enable() {
+ chk_conf_tag "$MODSECLNK"
+ if [ $RET -ne 2 ]; then
+ echo "CN: Disabling $PKG configuration for Apache2."
+ return 0