diff options
author | Willy Sudiarto Raharjo <willysr@slackware-id.org> | 2012-12-16 22:16:20 +0100 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-12-16 22:16:31 +0100 |
commit | 8d0150f686ed0c03f6ec2a224277a3afa15b4213 (patch) | |
tree | f7c72f22ad61a738a4684ddee3b2302c9531ccc5 /network/sshblock/doinst.sh | |
parent | de6041627c2629bea001f10f27604f8fa0a615f6 (diff) | |
download | slackbuilds-8d0150f686ed0c03f6ec2a224277a3afa15b4213.tar.gz |
network/sshblock: Added (an SSH dictionary-attack blocker).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/sshblock/doinst.sh')
-rw-r--r-- | network/sshblock/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/network/sshblock/doinst.sh b/network/sshblock/doinst.sh new file mode 100644 index 0000000000..74db18c0e3 --- /dev/null +++ b/network/sshblock/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/rc.d/rc.sshblock.new |