Package apache2-mod_security: Скрипты

Post install

# Reconfigure Apache2:
/usr/sbin/a2chkconfig ||:

if [ -e /etc/httpd2/conf/mods-enabled/mod_security.load ]; then
    CONF_OK=0
    /usr/sbin/apachectl2 configtest && CONF_OK=1 ||:
    if [ "$CONF_OK" = "1" ]; then
	service httpd2 condrestart ||:
    else
        echo "Some errors detected in Apache2 configuration!"
	echo "To use modsecurity check configuration and start httpd2 service."
    echo
    fi
else
    echo "Apache2 modsecurity module had been installed, but does't enabled."
    echo "Check /etc/httpd2/conf/mods-start.d directory for files with 'mod_security=no' lines."
    echo
fi
Post uninstall

# Reconfigure Apache2:
/usr/sbin/a2chkconfig ||:
if [ "$1" = "0" ] ; then # last uninstall
    CONF_OK=0
    /usr/sbin/apachectl2 configtest && CONF_OK=1 ||:
    if [ "$CONF_OK" = "1" ]; then
	service httpd2 condrestart ||:
    else
        echo "Some errors detected in Apache2 configuration!"
	echo "To complete modsecurity uninstalling check configuration and restart httpd2 service."
	echo
    fi
fi
Pre uninstall

1
2
3
if [ "$1" = "0" ] ; then # last uninstall
    [ -e /etc/httpd2/conf/mods-enabled/mod_security.load ] && /usr/sbin/a2dismod mod_security 2>&1 >/dev/null ||:
fi