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