Skip to content

Instantly share code, notes, and snippets.

@rtomaszewski
Created August 13, 2012 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtomaszewski/3344318 to your computer and use it in GitHub Desktop.
Save rtomaszewski/3344318 to your computer and use it in GitHub Desktop.
An example bash script checking RackConnect deployment status
#!/bin/bash
iptables=$(iptables -nL)
ret=no
if echo $iptables | grep -q 'Chain INPUT .policy DROP.' ; then
if echo $iptables | grep -q 'Chain FORWARD .policy DROP.' ; then
if echo $iptables | grep -q 'Chain OUTPUT .policy ACCEPT.' ; then
if echo $iptables | grep -q 'Chain RS-RackConnect-INBOUND' ; then
ret=yes
fi
fi
fi
fi
echo $ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment