mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-28 19:34:05 +02:00
Update run
This commit is contained in:
@@ -1,5 +1,16 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
##############
|
||||||
|
# CHECK PRIV #
|
||||||
|
##############
|
||||||
|
|
||||||
|
ip link delete dummy0 type dummy >/dev/null
|
||||||
|
ip link add dummy0 type dummy >/dev/null || {echo "Privileged mode is disabled, the addon will stop" && s6-svscanctl -t /var/run/s6/services}
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Add local drives #
|
||||||
|
####################
|
||||||
|
|
||||||
port="8080"
|
port="8080"
|
||||||
host="localhost"
|
host="localhost"
|
||||||
timeout="30"
|
timeout="30"
|
||||||
@@ -12,5 +23,4 @@ fi
|
|||||||
timeout ${timeout_argument} "${timeout}" \
|
timeout ${timeout_argument} "${timeout}" \
|
||||||
bash -c \
|
bash -c \
|
||||||
"until echo > /dev/tcp/${host}/${port} ; do sleep 0.5; done" \
|
"until echo > /dev/tcp/${host}/${port} ; do sleep 0.5; done" \
|
||||||
>/dev/null 2>&1 && bash -c "scrutiny-collector-metrics run" || echo "port $port is not available. Is Protected mode enabled ?" && "s6-svscanctl -t /var/run/s6/services"
|
>/dev/null 2>&1 && bash -c "scrutiny-collector-metrics run" || echo "port $port is not available, local devices won't be available"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user