run_test.sh 593 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. ./bin/echo_server &
  3. ./bin/http_server &
  4. ./../bin/frps -c ./conf/auto_test_frps.ini &
  5. sleep 1
  6. ./../bin/frpc -c ./conf/auto_test_frpc.ini &
  7. # wait until proxies are connected
  8. for((i=1; i<15; i++))
  9. do
  10. sleep 1
  11. str=`ss -ant|grep 10700|grep LISTEN`
  12. if [ -z "${str}" ]; then
  13. echo "kong"
  14. continue
  15. fi
  16. str=`ss -ant|grep 10710|grep LISTEN`
  17. if [ -z "${str}" ]; then
  18. echo "kong"
  19. continue
  20. fi
  21. str=`ss -ant|grep 10711|grep LISTEN`
  22. if [ -z "${str}" ]; then
  23. echo "kong"
  24. continue
  25. fi
  26. break
  27. done
  28. sleep 1