diff options
author | pyllyukko <pyllyukko@maimed.org> | 2021-04-09 22:13:47 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-04-10 17:04:36 +0700 |
commit | 4e088ca04ed0bf90caa27b52c7bb37564a20a856 (patch) | |
tree | 71ee92692f85938d5c08da4d76173ee3919813bd /libraries/libprelude/doinst.sh | |
parent | 9d5a89e5b7990b998e35597f8ab16598e607aaa7 (diff) |
libraries/libprelude: Added (Prelude SIEM/sensor library)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/libprelude/doinst.sh')
-rw-r--r-- | libraries/libprelude/doinst.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libraries/libprelude/doinst.sh b/libraries/libprelude/doinst.sh new file mode 100644 index 000000000000..0ca862d4dbcd --- /dev/null +++ b/libraries/libprelude/doinst.sh @@ -0,0 +1,17 @@ +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 |