This commit is contained in:
Alexandre
2021-12-07 20:32:45 +01:00
13 changed files with 89 additions and 25 deletions

View File

@@ -1,8 +1,8 @@
#!/usr/bin/env bashio
# Autodefine if not defined
if [ -z INTERFACE_NAME ]; then
INTERFACE_NAME=$(ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p')
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"
fi