diff options
author | Peter Palfrader <peter@palfrader.org> | 2013-03-06 13:30:49 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2013-03-06 13:30:49 +0000 |
commit | 948e8bed4029b9dcedc6e7c73daae37def43f020 (patch) | |
tree | b6cd4d9d5782adad60f121239b67df9e7c3bb4fd | |
parent | ef7e71925307485205d8ca175668a530397e8dfa (diff) |
Encode what happened in exit code
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@588 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-x | tor-exit-ssl-check | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tor-exit-ssl-check b/tor-exit-ssl-check index ed9aaa7..38807d7 100755 --- a/tor-exit-ssl-check +++ b/tor-exit-ssl-check @@ -189,17 +189,17 @@ while : ; do elif egrep '^connect:errno=' "$tmpdir/cert-tor" > /dev/null; then [ "$verbose" -lt 1 ] || diff -U100 "$tmpdir/cert-tor" "$tmpdir/cert-direct" || true echo "RESULT: $server: Connect failed" - errors=1 + errors=$((errors | 0x02)) elif egrep '^[0-9]*:error:.*:ssl handshake failure:' "$tmpdir/cert-tor" > /dev/null; then [ "$verbose" -lt 1 ] || diff -U100 "$tmpdir/cert-tor" "$tmpdir/cert-direct" || true echo "RESULT: $server: SSL Handshake failed" - errors=1 + errors=$((errors | 0x04)) else echo "RESULT: $server: differences!" [ "$verbose" = 0 ] || echo "====" [ "$verbose" = 0 ] || echo "Diff:" diff -U100 "$tmpdir/cert-tor" "$tmpdir/cert-direct" || true - errors=1 + errors=$((errors | 0x08)) fi [ "$torserver" = "-" ] || break |