mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-30 00:49:44 +00:00
upd: update project ( actualize to gen )
This commit is contained in:
@@ -7,7 +7,7 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
OLCRTC_CARRIER: "${OLCRTC_CARRIER:?set OLCRTC_CARRIER (telemost, jazz, wbstream)}"
|
||||
OLCRTC_ROOM_ID: "${OLCRTC_ROOM_ID:?set OLCRTC_ROOM_ID}"
|
||||
OLCRTC_ROOM_ID: "${OLCRTC_ROOM_ID:-}"
|
||||
OLCRTC_KEY: "${OLCRTC_KEY:-}"
|
||||
OLCRTC_DNS: "${OLCRTC_DNS:-1.1.1.1:53}"
|
||||
OLCRTC_SOCKS_PROXY: "${OLCRTC_SOCKS_PROXY:-}"
|
||||
|
||||
@@ -112,11 +112,7 @@ esac
|
||||
echo "[*] Using transport: $TRANSPORT"
|
||||
echo ""
|
||||
|
||||
if [ "$CARRIER" = "jazz" ]; then
|
||||
read -p "Enter Room ID (format: roomId:password from server): " ROOM_ID
|
||||
else
|
||||
read -p "Enter Room ID: " ROOM_ID
|
||||
fi
|
||||
read -p "Enter Room ID: " ROOM_ID
|
||||
|
||||
if [ -z "$ROOM_ID" ]; then
|
||||
echo "[X] Room ID cannot be empty"
|
||||
|
||||
@@ -59,9 +59,22 @@ vp8_batch="${OLCRTC_VP8_BATCH:-0}"
|
||||
[ "$mode" = "srv" ] || die "server image defaults to OLCRTC_MODE=srv; got '$mode'"
|
||||
[ -n "$carrier" ] || die "set OLCRTC_CARRIER (e.g. telemost, jazz, wbstream)"
|
||||
[ -n "$transport" ] || die "set OLCRTC_TRANSPORT (e.g. datachannel, videochannel, seichannel, vp8channel)"
|
||||
[ -n "$room_id" ] || die "set OLCRTC_ROOM_ID to the room identifier"
|
||||
[ -n "$client_id" ] || die "set OLCRTC_CLIENT_ID to bind the expected client"
|
||||
|
||||
if [ -z "$room_id" ]; then
|
||||
case "$carrier" in
|
||||
jazz|wbstream)
|
||||
echo "olcrtc-entrypoint: OLCRTC_ROOM_ID not set, generating room via -mode gen..." >&2
|
||||
room_id=$(/usr/local/bin/olcrtc -mode gen -carrier "$carrier" -dns "$dns_server" -amount 1 -data "$data_dir")
|
||||
[ -n "$room_id" ] || die "room generation failed for carrier '$carrier'"
|
||||
echo "olcrtc-entrypoint: generated room ID: $room_id" >&2
|
||||
;;
|
||||
*)
|
||||
die "set OLCRTC_ROOM_ID to the room identifier"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$key" ]; then
|
||||
if [ -s "$key_file" ]; then
|
||||
key="$(tr -d '[:space:]' < "$key_file")"
|
||||
|
||||
Reference in New Issue
Block a user