slackbuilds_ponce/network/murmur/doinst.sh
James Geboski 19484706bc network/murmur: Updated for version 1.2.3 new maintainer.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
2012-04-30 00:40:02 -05:00

28 lines
519 B
Bash

#!/bin/sh
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
rm $NEW
fi
}
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
}
config etc/logrotate.d/murmur.new
config etc/murmur.ini.new
preserve_perms etc/rc.d/rc.murmur.new