slackbuilds_ponce/network/postfix-pgsql/doinst.sh
Eugene Wissner 97b886208c
network/postfix-pgsql: Added (postfix with support for PostgreSQL)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-07-30 11:26:23 +07:00

14 lines
397 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/postfix/dynamicmaps.cf.d/pgsql.cf.new