mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
update
This commit is contained in:
@@ -33,13 +33,10 @@ RUN \
|
||||
&& sed '11,13d' /defaults/qBittorrent.conf \
|
||||
&& echo 'WebUI\HostHeaderValidation=false' >> /defaults/qBittorrent.conf \
|
||||
&& echo 'WebUI\LocalHostAuth=false' >> /defaults/qBittorrent.conf
|
||||
# use /data instead of /config for hass.io environment
|
||||
# && files=$(grep -rls '/config' /) && echo $files | xargs sed -i "s=/config=/data=g" \
|
||||
# use /data instead of /config for hass.io environment
|
||||
# && files=$(grep -rls '/config' /) && echo $files | xargs sed -i "s=/config=/data=g" \
|
||||
|
||||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
|
||||
# Allow custom scripts execution
|
||||
RUN chmod -R 755 /scripts/
|
||||
|
||||
VOLUME [ "/data" ]
|
||||
|
||||
@@ -6,7 +6,9 @@ RUN \
|
||||
# Allow UID and GID setting
|
||||
sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \
|
||||
&& sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \
|
||||
&& sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \
|
||||
&& sed -i -e '$a\scrutiny-collector-metrics run' /etc/cont-init.d/50-config
|
||||
&& sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser
|
||||
|
||||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
|
||||
VOLUME [ "/data" ]
|
||||
@@ -40,4 +40,4 @@
|
||||
"PGID": "int",
|
||||
"TZ": "str?"
|
||||
}
|
||||
}
|
||||
}
|
||||
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