Start_SignallingServer.sh 869 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. # Copyright Epic Games, Inc. All Rights Reserved.
  3. BASH_LOCATION=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
  4. pushd "${BASH_LOCATION}" > /dev/null
  5. source common_utils.sh
  6. set_start_default_values "n" "y" # Set STUN server defaults only
  7. use_args "$@"
  8. call_setup_sh
  9. print_parameters
  10. peerconnectionoptions='{\"iceServers\":[{\"urls\":[\"stun:${stunserver}\"]}]}'
  11. process="${BASH_LOCATION}/node/lib/node_modules/npm/bin/npm-cli.js run start:default --"
  12. arguments=""
  13. if [ ! -z $IS_DEBUG ]; then
  14. arguments+=" --inspect"
  15. fi
  16. arguments+=" --peerConnectionOptions=\"${peerconnectionoptions}\" --PublicIp=${publicip}"
  17. # Add arguments passed to script to arguments for executable
  18. arguments+=" ${cirruscmd}"
  19. pushd ../..
  20. echo "Running: $process $arguments"
  21. PATH="${BASH_LOCATION}/node/bin:$PATH"
  22. start_process $process $arguments
  23. popd
  24. popd