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