2014-03-20 08:20:43 +04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# client-test.sh
|
|
|
|
|
|
|
|
[ ! -x ./examples/client/client ] && echo -e "\n\nClient doesn't exist" && exit 1
|
|
|
|
|
|
|
|
# is our desired server there?
|
2014-03-20 22:05:03 +04:00
|
|
|
ping -c 2 -i 0.2 www.google.com
|
2014-03-20 08:20:43 +04:00
|
|
|
RESULT=$?
|
|
|
|
[ $RESULT -ne 0 ] && echo -e "\n\nCouldn't find server, skipping" && exit 0
|
|
|
|
|
|
|
|
# client test against the server
|
2014-03-20 21:37:53 +04:00
|
|
|
./examples/client/client -h www.google.com -p 443 -g -d
|
2014-03-20 08:20:43 +04:00
|
|
|
RESULT=$?
|
|
|
|
[ $RESULT -ne 0 ] && echo -e "\n\nClient connection failed" && exit 1
|
|
|
|
|
|
|
|
exit 0
|