slackbuilds_ponce/network/modsecurity-apache/doinst.sh
pyllyukko 81c46c614c network/modsecurity-apache: Added (a web application firewall)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
2011-08-13 08:43:55 -03:00

15 lines
405 B
Bash

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