Update 90-run.sh

This commit is contained in:
Alexandre
2022-12-27 15:34:22 +01:00
committed by GitHub
parent f6e4de92bd
commit 0db261f773

View File

@@ -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 #
########