summaryrefslogtreecommitdiff
path: root/network/spamassassin/doinst.sh
diff options
context:
space:
mode:
authorLukenShiro <lukenshiro@ngi.it>2010-05-11 22:55:02 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:55:02 +0200
commit5353c184c86aed67139de4eec525ae4e29724c50 (patch)
tree2e4b8db366f502641de12e387d1453d62ebdfd02 /network/spamassassin/doinst.sh
parent514dcdf4e2f4e11c75ec9b78be869fa9999da133 (diff)
downloadslackbuilds-5353c184c86aed67139de4eec525ae4e29724c50.tar.gz
network/spamassassin: Added to 12.1 repository
Diffstat (limited to 'network/spamassassin/doinst.sh')
-rw-r--r--network/spamassassin/doinst.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/network/spamassassin/doinst.sh b/network/spamassassin/doinst.sh
new file mode 100644
index 0000000000..470032e47d
--- /dev/null
+++ b/network/spamassassin/doinst.sh
@@ -0,0 +1,32 @@
+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...
+}
+
+# Keep same permissions on rc.spamd.new as an existing rc.spamd:
+if [ -e etc/rc.d/rc.spamd ]; then
+ cp -a etc/rc.d/rc.spamd etc/rc.d/rc.spamd.new.incoming
+ cat etc/rc.d/rc.spamd.new > etc/rc.d/rc.spamd.new.incoming
+ mv etc/rc.d/rc.spamd.new.incoming etc/rc.d/rc.spamd.new
+else
+ # If rc.spamd does not exist, make the new one executable by default,
+ # which won't matter unless it's called from rc.local anyway
+ chmod 0755 etc/rc.d/rc.spamd.new
+fi
+
+config etc/mail/spamassassin/init.pre.new
+config etc/mail/spamassassin/local.cf.new
+config etc/mail/spamassassin/v310.pre.new
+config etc/mail/spamassassin/v312.pre.new
+config etc/mail/spamassassin/v320.pre.new
+config etc/rc.d/rc.spamd.new
+config etc/spamassassin.conf.new
+