mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-15 21:31:50 +02:00
update
This commit is contained in:
14
scrutiny/rootfs/etc/services.d/script/run
Normal file
14
scrutiny/rootfs/etc/services.d/script/run
Normal 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"
|
||||
Reference in New Issue
Block a user