diff options
author | pyllyukko <pyllyukko AT maimed dot org> | 2011-08-13 08:43:55 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-08-13 08:43:55 -0300 |
commit | 81c46c614c8a4e12fbda3920ce4d2f925774d8b3 (patch) | |
tree | f285dcf5bd0455a75cf4ebd6efd5d7e375c19d33 /network/modsecurity-apache/doinst.sh | |
parent | 5511d6be945f0e58c0812d2ae2da20cc3bb0c0f6 (diff) | |
download | slackbuilds-81c46c614c8a4e12fbda3920ce4d2f925774d8b3.tar.gz |
network/modsecurity-apache: Added (a web application firewall)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/modsecurity-apache/doinst.sh')
-rw-r--r-- | network/modsecurity-apache/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/network/modsecurity-apache/doinst.sh b/network/modsecurity-apache/doinst.sh new file mode 100644 index 0000000000..4edf9ce1c2 --- /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 + |