Skip to content

Commit 248c690

Browse files
committed
Fix testhest mistake and make sure derived_tunnel_name is all lower case, incase some windows users, actively uses this image and has uppercase hostnames
1 parent e60ab8d commit 248c690

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Dockerfile.entrypoint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ if [ ! -f /etc/cloudflared/config.yml ]; then
5353
fi
5454

5555
export TUNNEL_FORCE_PROVISIONING_DNS='false'
56-
derived_tunnel_name=$(echo "${TUNNEL_HOSTNAME}" | sed "s,^.*://,,g")
56+
derived_tunnel_name=$(echo "${TUNNEL_HOSTNAME}" | sed "s,^.*://,,g" | tr '[:upper:]' '[:lower:]')
5757
export TUNNEL_NAME="${TUNNEL_NAME:-${derived_tunnel_name}}"
5858

5959
# Check for active connections and/or cleanup pending connections
60-
tunnel_info=$(cloudflared --loglevel error tunnel info --output json testhest.stocklydev.se)
60+
tunnel_info=$(cloudflared --loglevel error tunnel info --output json "${TUNNEL_NAME}")
6161
is_active=$(echo "${tunnel_info}" | jq '.conns[] | .conns[] | select(.is_pending_reconnect == false) | length' | wc -l)
6262
if [ "$is_active" != "0" ]; then
6363
printAndExit 1 "Active tunnels for '${TUNNEL_NAME}' found, shutting down"

0 commit comments

Comments
 (0)