From 0db261f773e3c5df5e0509566addf1e800aaa7e3 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:34:22 +0100 Subject: [PATCH] Update 90-run.sh --- scrutiny_fa/rootfs/etc/cont-init.d/90-run.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scrutiny_fa/rootfs/etc/cont-init.d/90-run.sh b/scrutiny_fa/rootfs/etc/cont-init.d/90-run.sh index e7055103b..848b9c710 100755 --- a/scrutiny_fa/rootfs/etc/cont-init.d/90-run.sh +++ b/scrutiny_fa/rootfs/etc/cont-init.d/90-run.sh @@ -1,6 +1,23 @@ #!/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" + mkdir -p /share/scrutiny + if [ -f /data/config/collector.yaml] ; then + cp -rnf /data/config/collector.yaml /share/scrutiny || true + rm -R /data/config/collector.yaml + else + touch /share/scrutiny/collector.yaml + fi + ln -s /share/scrutiny/collector.yaml /data/config + chmod 777 -R /share/scrutiny +fi + ######## # MODE # ########