Skip to content

Instantly share code, notes, and snippets.

@runemadsen
Forked from weavenet/gist:1524036
Created January 24, 2013 21:11
Show Gist options
  • Save runemadsen/4627792 to your computer and use it in GitHub Desktop.
Save runemadsen/4627792 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ `whoami` != "root" ]; then
echo "$0 must be run as root."
exit 1
fi
for i in $(locate webrick/config.rb); do
echo "Processing $i"
sed -e 's/^.*:DoNotReverseLookup => nil,$/:DoNotReverseLookup => true,/' $i > /tmp/config.rb
if [ $? -ne 0 ]; then
echo "Error processing file"
exit 1
fi
/bin/cp /tmp/config.rb $i
/bin/rm /tmp/config.rb
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment