mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-14 01:50:32 +02: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.
|
- `disable_dashboard`: Disable the dashboard service entirely.
|
||||||
- `enable_relay`: Enable the NetBird relay service (requires `relay_exposed_address` and `relay_auth_secret`).
|
- `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.
|
- `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
|
### Generated configuration
|
||||||
On first start, the add-on creates:
|
On first start, the add-on creates:
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ options:
|
|||||||
enable_relay: false
|
enable_relay: false
|
||||||
relay_exposed_address: ""
|
relay_exposed_address: ""
|
||||||
relay_auth_secret: ""
|
relay_auth_secret: ""
|
||||||
allow_legacy_ports: false
|
|
||||||
schema:
|
schema:
|
||||||
data_dir: str
|
data_dir: str
|
||||||
domain: str?
|
domain: str?
|
||||||
@@ -75,7 +74,6 @@ schema:
|
|||||||
enable_relay: bool
|
enable_relay: bool
|
||||||
relay_exposed_address: str?
|
relay_exposed_address: str?
|
||||||
relay_auth_secret: str?
|
relay_auth_secret: str?
|
||||||
allow_legacy_ports: bool
|
|
||||||
slug: netbird-server
|
slug: netbird-server
|
||||||
ports:
|
ports:
|
||||||
33073/tcp: 33073
|
33073/tcp: 33073
|
||||||
|
|||||||
@@ -187,14 +187,15 @@ else
|
|||||||
bashio::log.info "Using existing management config at ${MANAGEMENT_CONFIG}."
|
bashio::log.info "Using existing management config at ${MANAGEMENT_CONFIG}."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate Coturn config
|
# Generate Coturn config if missing
|
||||||
TURN_CONFIG="$DATA_DIR/turn/turnserver.conf"
|
TURN_CONFIG="$DATA_DIR/turn/turnserver.conf"
|
||||||
TURN_EXTERNAL_IP_LINE=""
|
if [[ ! -f "$TURN_CONFIG" ]]; then
|
||||||
if [[ -n "$TURN_EXTERNAL_IP" ]]; then
|
TURN_EXTERNAL_IP_LINE=""
|
||||||
|
if [[ -n "$TURN_EXTERNAL_IP" ]]; then
|
||||||
TURN_EXTERNAL_IP_LINE="external-ip=${TURN_EXTERNAL_IP}"
|
TURN_EXTERNAL_IP_LINE="external-ip=${TURN_EXTERNAL_IP}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<CONFIG > "$TURN_CONFIG"
|
cat <<CONFIG > "$TURN_CONFIG"
|
||||||
listening-port=${TURN_LISTEN_PORT}
|
listening-port=${TURN_LISTEN_PORT}
|
||||||
realm=${TURN_REALM}
|
realm=${TURN_REALM}
|
||||||
fingerprint
|
fingerprint
|
||||||
@@ -204,6 +205,9 @@ ${TURN_EXTERNAL_IP_LINE}
|
|||||||
min-port=${TURN_MIN_PORT}
|
min-port=${TURN_MIN_PORT}
|
||||||
max-port=${TURN_MAX_PORT}
|
max-port=${TURN_MAX_PORT}
|
||||||
CONFIG
|
CONFIG
|
||||||
|
else
|
||||||
|
bashio::log.info "Using existing Coturn config at ${TURN_CONFIG}."
|
||||||
|
fi
|
||||||
|
|
||||||
# Generate dashboard nginx config
|
# Generate dashboard nginx config
|
||||||
sed "s/__DASHBOARD_PORT__/${DASHBOARD_PORT}/g" \
|
sed "s/__DASHBOARD_PORT__/${DASHBOARD_PORT}/g" \
|
||||||
|
|||||||
Reference in New Issue
Block a user