aboutsummaryrefslogtreecommitdiff
path: root/system/systraq/doinst.sh
diff options
context:
space:
mode:
authorPierre-Philipp Braun <pbraun@nethence.com>2022-10-05 07:52:12 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-10-08 09:12:44 +0700
commita6ba9f612e3369b8036b2ac11acbf8e850a5fd1b (patch)
tree536f76c630fab0b7970cab228abfee101da9b8e8 /system/systraq/doinst.sh
parentdf826762e291090b10991b2322ffa39af3841e2e (diff)
system/systraq: Added (monitor system files change)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/systraq/doinst.sh')
-rw-r--r--system/systraq/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/systraq/doinst.sh b/system/systraq/doinst.sh
new file mode 100644
index 0000000000..0f83faf9dc
--- /dev/null
+++ b/system/systraq/doinst.sh
@@ -0,0 +1,15 @@
+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/filetraq.conf.new
+