summaryrefslogtreecommitdiff
path: root/network/milter-greylist/doinst.sh
diff options
context:
space:
mode:
authorDave Woodfall <dave@tty1.uk>2018-12-12 02:31:27 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-12-15 20:44:23 +0700
commit67ad7cc10ceb87d5af1a66ea85e3092853fab4b5 (patch)
tree9946c533f9598cc6060436e0cb0a78615e07f7cf /network/milter-greylist/doinst.sh
parent9e6d0156d4a68db1b535ee4dee67b0516d5e233d (diff)
downloadslackbuilds-67ad7cc10ceb87d5af1a66ea85e3092853fab4b5.tar.gz
network/milter-greylist: Add rc init script. Move .conf to .example.
Diffstat (limited to 'network/milter-greylist/doinst.sh')
-rw-r--r--network/milter-greylist/doinst.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/network/milter-greylist/doinst.sh b/network/milter-greylist/doinst.sh
index 0d5a67743a..90e65a9c0f 100644
--- a/network/milter-greylist/doinst.sh
+++ b/network/milter-greylist/doinst.sh
@@ -11,4 +11,15 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/mail/greylist.conf.new
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.milter-greylist.new