summaryrefslogtreecommitdiffstats
path: root/network/openfortivpn/doinst.sh
diff options
context:
space:
mode:
author Antonio Taverna2016-08-24 01:20:37 +0200
committer David Spencer2016-08-28 01:22:59 +0200
commitab52905a5256d6762f4f5e4c35726882f91bd96b (patch)
tree19841f865ad5f455eca760fdb5f0830500642f20 /network/openfortivpn/doinst.sh
parentd364a3c53259760addcc33a4f8475964bed0529b (diff)
downloadslackbuilds-ab52905a5256d6762f4f5e4c35726882f91bd96b.tar.gz
network/openfortivpn: Added (PPP+SSL VPN tunnel client).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/openfortivpn/doinst.sh')
-rw-r--r--network/openfortivpn/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/network/openfortivpn/doinst.sh b/network/openfortivpn/doinst.sh
new file mode 100644
index 0000000000..f7156957d2
--- /dev/null
+++ b/network/openfortivpn/doinst.sh
@@ -0,0 +1,14 @@
+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/openfortivpn/config.new