This commit is contained in:
Alexandre
2022-01-17 13:33:12 +01:00
parent 4bca8e9d74
commit 0205346557
4 changed files with 6 additions and 6 deletions

View File

@@ -1,9 +1,9 @@
#!/usr/bin/env bashio
# Autodefine if not defined
if [ ! -z INTERFACE_NAME ]; then
export INTERFACE_NAME=$(ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p')
bashio::log.blue "Autodetection : INTERFACE_NAME=$INTERFACE_NAME"
if [ -n INTERFACE_NAME ]; then
export INTERFACE_NAME=$(ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p')
bashio::log.blue "Autodetection : INTERFACE_NAME=$INTERFACE_NAME"
fi
bashio::log.info "Starting..."