Skip to content

Instantly share code, notes, and snippets.

@0x46616c6b
Created February 15, 2011 17:08
Show Gist options
  • Save 0x46616c6b/827822 to your computer and use it in GitHub Desktop.
Save 0x46616c6b/827822 to your computer and use it in GitHub Desktop.
Checks ServerNames from apaches vhost and checks the dns a record
#!/bin/sh
HOSTNAMES=`mktemp -p /tmp/`
grep -h "ServerName" /etc/apache2/sites-enabled/*|uniq|cut -d " " -f3 > $HOSTNAMES
dig -f $HOSTNAMES A +noall +answer
rm $HOSTNAMES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment