summaryrefslogtreecommitdiff
path: root/network/strongswan/doinst.sh
diff options
context:
space:
mode:
authorJonathan Larsen <agentc0re@learnix.net>2010-05-12 23:32:49 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 23:32:49 +0200
commitedf35a62ae5790efd15ad263724755ff10f462e5 (patch)
tree47730cbffe52e0a3d0bce88675603ede2a121d5a /network/strongswan/doinst.sh
parentac23f7579cef7d587954ae36544a421fcac769ba (diff)
downloadslackbuilds-edf35a62ae5790efd15ad263724755ff10f462e5.tar.gz
network/strongswan: Added to 12.2 repository
Diffstat (limited to 'network/strongswan/doinst.sh')
-rw-r--r--network/strongswan/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/network/strongswan/doinst.sh b/network/strongswan/doinst.sh
new file mode 100644
index 0000000000..760618d9b9
--- /dev/null
+++ b/network/strongswan/doinst.sh
@@ -0,0 +1,15 @@
+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
+