summaryrefslogtreecommitdiff
path: root/network/bitlbee/doinst.sh
diff options
context:
space:
mode:
authorMichiel van Wessem <michiel.van.wessem@gmail.com>2010-05-11 15:01:25 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 15:01:25 +0200
commit7307b31029eb1b74e3725e8cada8e25148728ad4 (patch)
tree8daea9d3cb0f20879254f875f73ae1c5b931694e /network/bitlbee/doinst.sh
parent5d0d367915484b3251cbd1d4f554a91ccbbb8311 (diff)
downloadslackbuilds-7307b31029eb1b74e3725e8cada8e25148728ad4.tar.gz
network/bitlbee: Initial import
Diffstat (limited to 'network/bitlbee/doinst.sh')
-rw-r--r--network/bitlbee/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/network/bitlbee/doinst.sh b/network/bitlbee/doinst.sh
new file mode 100644
index 0000000000..8ce9469eb1
--- /dev/null
+++ b/network/bitlbee/doinst.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Handle the incoming configuration files:
+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/bitlbee/bitlbee.conf.new
+config /etc/bitlbee/motd.txt.new \ No newline at end of file