slackbuilds_ponce/network/suricata/doinst.sh
Dimitris Zlatanidis 6b68afeaa5 network/suricata: Added (Network Security Monitoring).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2014-02-21 14:41:02 -06:00

17 lines
514 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/suricata/classification.config.new
config etc/suricata/reference.config.new
config etc/suricata/suricata.yaml.new
config etc/suricata/threshold.config.new