From 6fa59bb9fed6180d32ab57dd0e429ae45b8bc697 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 24 Nov 2022 04:28:39 +0100 Subject: [PATCH] Update 90-run.sh --- scrutiny/rootfs/etc/cont-init.d/90-run.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scrutiny/rootfs/etc/cont-init.d/90-run.sh b/scrutiny/rootfs/etc/cont-init.d/90-run.sh index 2883628fa..6bdb95e88 100644 --- a/scrutiny/rootfs/etc/cont-init.d/90-run.sh +++ b/scrutiny/rootfs/etc/cont-init.d/90-run.sh @@ -1,6 +1,19 @@ #!/usr/bin/with-contenv bashio # shellcheck shell=bash +######################### +# EXPOSE COLLECTOR.YAML # +######################### + +if bashio::config.true "expose_collector"; then + bashio::log.info "collector.yaml exposed in /share/scrutiny. It will only be accessible if the addon is running" + mkdir -p /share/scrutiny + cp -rnf /data/config/collector.yaml /share/scrutiny || true + rm -R /data/config/collector.yaml + ln -s /share/scrutiny/collector.yaml /data/config + chmod 777 -R /share/scrutiny +fi + ######## # MODE # ########