diff options
author | Eric B. Pratt <eric.b.pratt@gmail.com> | 2011-03-05 07:08:00 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-03-05 07:08:00 -0300 |
commit | 1ecf929173d184a8e66188524cbb1a95c8bcd38e (patch) | |
tree | cdbf032ecc2acc8974fa87914a0edca00515afca /network/fwknop/doinst.sh | |
parent | 915d5559e0cf5fbe29557b9b63a84f77ee2144a5 (diff) | |
download | slackbuilds-1ecf929173d184a8e66188524cbb1a95c8bcd38e.tar.gz |
network/fwknop: Added (Single Packet Authorization / Port Knocking)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/fwknop/doinst.sh')
-rw-r--r-- | network/fwknop/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/network/fwknop/doinst.sh b/network/fwknop/doinst.sh new file mode 100644 index 0000000000..55373d8ee2 --- /dev/null +++ b/network/fwknop/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/fwknop/access.conf.new +config etc/fwknop/fwknopd.conf.new |