setup_env.sh 888 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. set -e
  3. emqx_ids=`ps aux|grep "emqx" | grep "/usr/bin"|awk '{printf $2 " "}'`
  4. if [ "$emqx_ids" = "" ] ; then
  5. echo "No emqx broker was started"
  6. emqx start
  7. echo "Success started emqx "
  8. else
  9. echo "emqx has already started"
  10. #for pid in $emqx_ids ; do
  11. #echo "kill emqx: " $pid
  12. #kill -9 $pid
  13. #done
  14. fi
  15. pids=`ps aux|grep "kuiperd" | grep "bin"|awk '{printf $2 " "}'`
  16. if [ "$pids" = "" ] ; then
  17. echo "No kuiper server was started"
  18. else
  19. for pid in $pids ; do
  20. echo "kill kuiper " $pid
  21. kill -9 $pid
  22. done
  23. fi
  24. test/start_kuiper.sh
  25. chmod +x test/build_edgex_mock.sh
  26. test/build_edgex_mock.sh
  27. pids=`ps aux | grep http_server | grep "./" | awk '{printf $2 " "}'`
  28. if [ "$pids" = "" ] ; then
  29. echo "No http mockup server was started"
  30. else
  31. for pid in $pids ; do
  32. echo "kill http mockup server " $pid
  33. kill -9 $pid
  34. done
  35. fi
  36. test/prepare_plugins.sh