mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-17 03:20:31 +02:00
Fix Manyfold public hostname detection
This commit is contained in:
@@ -10,6 +10,7 @@ arch:
|
|||||||
startup: services
|
startup: services
|
||||||
init: false
|
init: false
|
||||||
hassio_api: true
|
hassio_api: true
|
||||||
|
homeassistant_api: true
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
3214/tcp: 3214
|
3214/tcp: 3214
|
||||||
|
|||||||
@@ -36,7 +36,12 @@ strip_hostname() {
|
|||||||
raw="${raw#http://}"
|
raw="${raw#http://}"
|
||||||
raw="${raw#https://}"
|
raw="${raw#https://}"
|
||||||
raw="${raw%%/*}"
|
raw="${raw%%/*}"
|
||||||
|
|
||||||
|
if [[ "$raw" =~ ^(\[[^]]+\])(:[0-9]+)?$ ]]; then
|
||||||
|
raw="${BASH_REMATCH[1]}"
|
||||||
|
else
|
||||||
raw="${raw%%:*}"
|
raw="${raw%%:*}"
|
||||||
|
fi
|
||||||
|
|
||||||
printf '%s\n' "$raw"
|
printf '%s\n' "$raw"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user