slackbuilds_ponce/network/strongswan/doinst.sh
Markus Hutmacher 7132483fc0 network/strongswan: Updated for version 5.1.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2013-12-02 16:25:33 +07:00

14 lines
392 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/ipsec.conf.new
config etc/strongswan.conf.new