From f2f8796e8ca23361bca95663c7a182c62df2be05 Mon Sep 17 00:00:00 2001 From: tyranron Date: Mon, 17 May 2021 23:38:38 +0300 Subject: [PATCH] Hack IFS in 'detect-external-ip' script of Docker image to support both Debian and Alpine --- docker/coturn/rootfs/usr/local/bin/detect-external-ip.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/coturn/rootfs/usr/local/bin/detect-external-ip.sh b/docker/coturn/rootfs/usr/local/bin/detect-external-ip.sh index 3dced9c..c019c2f 100644 --- a/docker/coturn/rootfs/usr/local/bin/detect-external-ip.sh +++ b/docker/coturn/rootfs/usr/local/bin/detect-external-ip.sh @@ -100,7 +100,8 @@ else } fi -IFS=$'\n'; for COMMAND in $COMMANDS; do +IFS="$(printf '\nx')" && IFS="${IFS%x}" +for COMMAND in $COMMANDS; do if IP="$(eval "$COMMAND")" && is_valid_ip "$IP"; then printf '%s' "$IP" exit 0