From 81c46c614c8a4e12fbda3920ce4d2f925774d8b3 Mon Sep 17 00:00:00 2001 From: pyllyukko Date: Sat, 13 Aug 2011 08:43:55 -0300 Subject: network/modsecurity-apache: Added (a web application firewall) Signed-off-by: Niels Horn --- network/modsecurity-apache/doinst.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 network/modsecurity-apache/doinst.sh (limited to 'network/modsecurity-apache/doinst.sh') diff --git a/network/modsecurity-apache/doinst.sh b/network/modsecurity-apache/doinst.sh new file mode 100644 index 000000000000..4edf9ce1c2db --- /dev/null +++ b/network/modsecurity-apache/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/httpd/extra/modsecurity-recommended.conf.new + -- cgit v1.2.3