slackbuilds_ponce/libraries/libprelude/doinst.sh
pyllyukko 4e088ca04e
libraries/libprelude: Added (Prelude SIEM/sensor library)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2021-04-10 17:04:36 +07:00

17 lines
523 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/prelude/default/client.conf.new
config etc/prelude/default/global.conf.new
config etc/prelude/default/idmef-client.conf.new
config etc/prelude/default/tls.conf.new