This commit is contained in:
Alexandre
2021-02-11 10:37:17 +01:00
parent f5e1acf5f2
commit 5a72191123
4 changed files with 21 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
#!/bin/bash
port="8080"
host="localhost"
timeout="30"
timeout_argument=""
if timeout -t 1337 true >/dev/null 2>&1; then
timeout_argument="-t"
fi
timeout ${timeout_argument} "${timeout}" \
bash -c \
"until echo > /dev/tcp/${host}/${port} ; do sleep 0.5; done" \
>/dev/null 2>&1 && scrutiny-collector-metrics run || echo "port $port is not available"