#!/bin/sh TAB_HOST="localhost" TAB_PORT=${TAB_PORT:-1424} if [ -f /proc/1/cgroup ]; then if grep -q docker /proc/1/cgroup; then TAB_HOST=$(ip route | awk '/default/ { print $3 }') fi fi curl --max-time 5 --connect-timeout 3 -F"a=$(echo $1 | sed s/\"/%22/g)" http://${TAB_HOST}:${TAB_PORT}