mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-28 08:42:25 +01:00
Preserve Coturn config and drop legacy option
This commit is contained in:
@@ -27,7 +27,6 @@ The Dashboard container requires the `NETBIRD_MGMT_API_ENDPOINT` environment var
|
||||
- `disable_dashboard`: Disable the dashboard service entirely.
|
||||
- `enable_relay`: Enable the NetBird relay service (requires `relay_exposed_address` and `relay_auth_secret`).
|
||||
- `turn_external_ip`: Public IP to advertise when Coturn is behind NAT.
|
||||
- `allow_legacy_ports`: Keep legacy port exposure for pre-v0.29 agents (see NetBird docs).
|
||||
|
||||
### Generated configuration
|
||||
On first start, the add-on creates:
|
||||
|
||||
@@ -41,7 +41,6 @@ options:
|
||||
enable_relay: false
|
||||
relay_exposed_address: ""
|
||||
relay_auth_secret: ""
|
||||
allow_legacy_ports: false
|
||||
schema:
|
||||
data_dir: str
|
||||
domain: str?
|
||||
@@ -75,7 +74,6 @@ schema:
|
||||
enable_relay: bool
|
||||
relay_exposed_address: str?
|
||||
relay_auth_secret: str?
|
||||
allow_legacy_ports: bool
|
||||
slug: netbird-server
|
||||
ports:
|
||||
33073/tcp: 33073
|
||||
|
||||
@@ -187,14 +187,15 @@ else
|
||||
bashio::log.info "Using existing management config at ${MANAGEMENT_CONFIG}."
|
||||
fi
|
||||
|
||||
# Generate Coturn config
|
||||
# Generate Coturn config if missing
|
||||
TURN_CONFIG="$DATA_DIR/turn/turnserver.conf"
|
||||
TURN_EXTERNAL_IP_LINE=""
|
||||
if [[ -n "$TURN_EXTERNAL_IP" ]]; then
|
||||
TURN_EXTERNAL_IP_LINE="external-ip=${TURN_EXTERNAL_IP}"
|
||||
fi
|
||||
if [[ ! -f "$TURN_CONFIG" ]]; then
|
||||
TURN_EXTERNAL_IP_LINE=""
|
||||
if [[ -n "$TURN_EXTERNAL_IP" ]]; then
|
||||
TURN_EXTERNAL_IP_LINE="external-ip=${TURN_EXTERNAL_IP}"
|
||||
fi
|
||||
|
||||
cat <<CONFIG > "$TURN_CONFIG"
|
||||
cat <<CONFIG > "$TURN_CONFIG"
|
||||
listening-port=${TURN_LISTEN_PORT}
|
||||
realm=${TURN_REALM}
|
||||
fingerprint
|
||||
@@ -204,6 +205,9 @@ ${TURN_EXTERNAL_IP_LINE}
|
||||
min-port=${TURN_MIN_PORT}
|
||||
max-port=${TURN_MAX_PORT}
|
||||
CONFIG
|
||||
else
|
||||
bashio::log.info "Using existing Coturn config at ${TURN_CONFIG}."
|
||||
fi
|
||||
|
||||
# Generate dashboard nginx config
|
||||
sed "s/__DASHBOARD_PORT__/${DASHBOARD_PORT}/g" \
|
||||
|
||||
Reference in New Issue
Block a user