summaryrefslogtreecommitdiff
path: root/system/mailfromd/doinst.sh
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-07-13 21:23:01 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-07-14 06:55:56 +0700
commitc26c9c5f7dd19ed2f92aa1ee06cfd461d31d77dc (patch)
treeb0267340d7f3829187c99802b6e8e4fc33bfe83d /system/mailfromd/doinst.sh
parentd1300b4c475232cb96f436721160e9b3bf65f391 (diff)
downloadslackbuilds-c26c9c5f7dd19ed2f92aa1ee06cfd461d31d77dc.tar.gz
system/mailfromd: Added (A General-Purpose Mail Filter).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/mailfromd/doinst.sh')
-rw-r--r--system/mailfromd/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/mailfromd/doinst.sh b/system/mailfromd/doinst.sh
new file mode 100644
index 0000000000..9ec38e6fc6
--- /dev/null
+++ b/system/mailfromd/doinst.sh
@@ -0,0 +1,15 @@
+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/mailfromd/mailfromd.mf.new
+config etc/rc.d/rc.mailfromd.new