diff --git a/setup.sh b/setup.sh index 335f59e..e2681cc 100644 --- a/setup.sh +++ b/setup.sh @@ -65,20 +65,20 @@ fi echo "HTTP_METHOD=$HTTP_METHOD" >> $FILE PUBLIC_URL=${PUBLIC_URL:=dev.domain.de} - read -p "Enter the url you want to enter the jitsi-admin with no protocoll (no http/https) [$PUBLIC_URL]: " input + read -p "Enter the Domain you want to enter the jitsi-admin with no protocoll [$PUBLIC_URL]: " input PUBLIC_URL=${input:=$PUBLIC_URL} sed -i '/PUBLIC_URL/d' $FILE echo "PUBLIC_URL=$PUBLIC_URL" >> $FILE if [ "$ENVIRONMENT" = "livekit" ]; then LIVEKIT_URL=${LIVEKIT_URL:=livekit-dev.domain.de} - read -p "Enter the url you want run your livekit server on (no http/https) [$LIVEKIT_URL]: " input + read -p "Enter the Domain you want run your livekit server on [$LIVEKIT_URL]: " input LIVEKIT_URL=${input:=$LIVEKIT_URL} sed -i '/LIVEKIT_URL/d' $FILE echo "LIVEKIT_URL=$LIVEKIT_URL" >> $FILE - TURN_URL=${TURN_URL:=turn-dev.domain.de} - read -p "Enter the url for your Turn Server (no http/https) [$TURN_URL]: " input + TURN_URL=${TURN_URL:=""} + read -p "Enter the Domain for your Turn Server (Empty if no Coturn setup) [$TURN_URL]: " input TURN_URL=${input:=$TURN_URL} sed -i '/TURN_URL/d' $FILE echo "TURN_URL=$TURN_URL" >> $FILE @@ -175,17 +175,23 @@ if [ "$ENVIRONMENT" = "livekit" ]; then echo --------- 4. Setup Livekit --------------------------------- echo ------------------------------------------------------------ echo "" - cp .templates/livekit.yaml livekit/livekit.yaml - sed -i "s||$LIVEKIT_KEY|g" livekit/livekit.yaml - sed -i "s||$KEYCLOAK_PW|g" livekit/livekit.yaml - sed -i "s||$TURN_URL|g" livekit/livekit.yaml - sed -i "s||$COTURN_KEY|g" livekit/livekit.yaml - cp .templates/traefik-livekit.yaml traefik/config.yaml sed -i "s||$LIVEKIT_URL|g" traefik/config.yaml + cp .templates/livekit.yaml livekit/livekit.yaml + sed -i "s||$LIVEKIT_KEY|g" livekit/livekit.yaml + sed -i "s||$KEYCLOAK_PW|g" livekit/livekit.yaml + + if [ -z "$COTURN_KEY" ]; then + sed -i '/turn_servers:/,/^ *credential: /d' livekit/livekit.yaml + else + sed -i "s||$TURN_URL|g" livekit/livekit.yaml + sed -i "s||$COTURN_KEY|g" livekit/livekit.yaml + fi + fi + echo ------------------------------------------------------------ echo --------- Option: Migrate and Setup Docker Volume User ----- echo ------------------------------------------------------------