slackbuilds_ponce/network/courier-authlib/doinst.sh
Derek Noonburg 22f0b340c3 network/courier-authlib: Added (Courier authentication library)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2013-10-27 23:39:01 -05:00

15 lines
449 B
Bash

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/authlib/authdaemonrc.new
config etc/authlib/authldaprc.new
config etc/authlib/authmysqlrc.new