Skip to content

Instantly share code, notes, and snippets.

@jayjanssen
Created June 23, 2011 17:25
Show Gist options
  • Save jayjanssen/1043053 to your computer and use it in GitHub Desktop.
Save jayjanssen/1043053 to your computer and use it in GitHub Desktop.
denyhosts ip removal script
#!/bin/sh
HOST=$1
cd /var/lib/denyhosts
for i in `ls`; do mv $i $i.old; grep -v $HOST $i.old >> $i; done
cp /etc/hosts.deny /tmp/hosts.deny
grep -v $HOST /tmp/hosts.deny > /etc/hosts.deny
@jayjanssen
Copy link
Author

Good question, must have been a copy-paste error or something. I noticed this in my private repository and fixed it this week, seems to work fine without the question marks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment