-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"
- MODSECRBL="$MODSECDIR/rbl_lookup.conf"
- MODSECLNK="$CONFDIR/$(basename $MODSECCONF)"
-
- need_restart=0
-
-
- # Disable ModSecurity configuration.
- chk_conf_tag "$MODSECCONF"
- if [ $RET -eq 0 ]; then
- if [ -e "$MODSECLNK" ]; then
- cp_echo "CN: Disabling ModSecurity configuration."
- rm -f "$MODSECLNK"
- need_restart=1
- fi
+ modsecurity_enable() {
+ chk_conf_tag "$MODSECLNK"
+ if [ $RET -ne 2 ]; then
+ echo "CN: Disabling $PKG configuration for Apache2."
+ return 0