digitaldemocratic/dd-sso/docker/waf-modsecurity/docker-entrypoint.sh

11 lines
298 B
Bash
Raw Normal View History

2022-11-22 23:05:54 +01:00
#!/bin/bash -e
set -e
if [ "${DISABLE_WAF:-true}" == "true" ]; then
2022-11-22 23:05:54 +01:00
sed -i.orig -e "s/modsecurity On/modsecurity Off/" /etc/apache2/sites-available/000-default.conf
else
sed -i.orig -e "s/modsecurity Off/modsecurity On/" /etc/apache2/sites-available/000-default.conf
fi
apachectl -D FOREGROUND