client-test.sh 441 B

1234567891011121314151617
  1. #!/bin/bash
  2. # client-test.sh
  3. [ ! -x ./examples/client/client ] && echo -e "\n\nClient doesn't exist" && exit 1
  4. # is our desired server there?
  5. ping -c 2 -i 0.2 www.google.com
  6. RESULT=$?
  7. [ $RESULT -ne 0 ] && echo -e "\n\nCouldn't find server, skipping" && exit 0
  8. # client test against the server
  9. ./examples/client/client -h www.google.com -p 443 -g -d
  10. RESULT=$?
  11. [ $RESULT -ne 0 ] && echo -e "\n\nClient connection failed" && exit 1
  12. exit 0