diff options
author | ArTourter <artourter@gmail.com> | 2019-12-01 08:35:54 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-12-01 08:35:54 +0700 |
commit | dd871037872db40d89ee41b89d964686ae2cc92b (patch) | |
tree | 276556c264b79738255789fdffca7ec6861531ce /system/logwatch/doinst.sh | |
parent | 69a4bb0fa8180976590677e4e5d3f097a36dcd27 (diff) | |
download | slackbuilds-dd871037872db40d89ee41b89d964686ae2cc92b.tar.gz slackbuilds-dd871037872db40d89ee41b89d964686ae2cc92b.tar.xz |
system/logwatch: Added (a customizable log analysis system).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/logwatch/doinst.sh')
-rw-r--r-- | system/logwatch/doinst.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/system/logwatch/doinst.sh b/system/logwatch/doinst.sh new file mode 100644 index 0000000000..a377eaacde --- /dev/null +++ b/system/logwatch/doinst.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +config() { + NEW="$1" + OLD="${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/logwatch/conf/logwatch.conf.new +config etc/logwatch/conf/ignore.conf.new +config etc/logwatch/conf/override.conf.new + |