summaryrefslogtreecommitdiffstats
path: root/system/logwatch/doinst.sh
diff options
context:
space:
mode:
author ArTourter2019-12-01 02:35:54 +0100
committer Willy Sudiarto Raharjo2019-12-01 02:35:54 +0100
commitdd871037872db40d89ee41b89d964686ae2cc92b (patch)
tree276556c264b79738255789fdffca7ec6861531ce /system/logwatch/doinst.sh
parent69a4bb0fa8180976590677e4e5d3f097a36dcd27 (diff)
downloadslackbuilds-dd871037872db40d89ee41b89d964686ae2cc92b.tar.gz
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.sh18
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
+