From d15049fec56b737821378340928e89afea8ba1f6 Mon Sep 17 00:00:00 2001 From: William Belcher Date: Thu, 19 Oct 2023 11:14:45 +1000 Subject: [PATCH] Update bash scripts to default to Linux --- .../platform_scripts/bash/Start_TURNServer.sh | 5 +---- SignallingWebServer/platform_scripts/bash/setup.sh | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/SignallingWebServer/platform_scripts/bash/Start_TURNServer.sh b/SignallingWebServer/platform_scripts/bash/Start_TURNServer.sh index f3502728..f1d04309 100755 --- a/SignallingWebServer/platform_scripts/bash/Start_TURNServer.sh +++ b/SignallingWebServer/platform_scripts/bash/Start_TURNServer.sh @@ -28,11 +28,8 @@ realm="PixelStreaming" process="" if [ "$(uname)" == "Darwin" ]; then process="${BASH_LOCATION}/coturn/bin/turnserver" -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - process="turnserver" else - echo 'Incorrect host OS for use with Start_TURNServer.sh' - exit -1 + process="turnserver" fi arguments="-c turnserver.conf --allowed-peer-ip=$localip -p ${turnport} -r $realm -X $publicip -E $localip -L $localip --no-cli --no-tls --no-dtls --pidfile /var/run/turnserver.pid -f -a -v -u ${turnusername}:${turnpassword}" diff --git a/SignallingWebServer/platform_scripts/bash/setup.sh b/SignallingWebServer/platform_scripts/bash/setup.sh index cd7e74c3..9cfc1d84 100755 --- a/SignallingWebServer/platform_scripts/bash/setup.sh +++ b/SignallingWebServer/platform_scripts/bash/setup.sh @@ -141,11 +141,8 @@ if [ "$(uname)" == "Darwin" ]; then echo 'Incompatible architecture. Only x86_64 and ARM64 are supported' exit -1 fi -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - node_url="https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz" else - echo 'Incorrect OS for use with setup.sh' - exit -1 + node_url="https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz" fi check_and_install "node" "$node_version" "$NODE_VERSION" "curl $node_url --output node.tar.xz && tar -xf node.tar.xz @@ -179,7 +176,7 @@ if [ "$(uname)" == "Darwin" ]; then tar -xf turnserver.zip -C "${BASH_LOCATION}/coturn" rm turnserver.zip fi -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then +else #command #dep_name #get_version_string #version_min #install command coturn_version=$(if command -v turnserver &> /dev/null; then echo 1; else echo 0; fi) if [ $coturn_version -eq 0 ]; then