slackbuilds_ponce/network/emailrelay/doinst.sh
Andrew Clemons d7398c2281 network/emailrelay: Fix doinst.sh.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2017-02-26 22:24:47 +07:00

14 lines
271 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
}
config etc/rc.d/rc.emailrelay.new
config etc/emailrelay.conf.new