mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Update 01-configuration.sh
This commit is contained in:
@@ -1,12 +1,24 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# shellcheck shell=bash
|
# 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 /opt/scrutiny/config/collector.yaml /share/scrutiny/collector.yaml
|
||||||
|
ln -s /share/scrutiny/collector.yaml /opt/scrutiny/config
|
||||||
|
chmod 777 -R /share/scrutiny
|
||||||
|
fi
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# Create folder #
|
# Create folder #
|
||||||
#################
|
#################
|
||||||
|
|
||||||
echo "Updating folders structure"
|
|
||||||
DATABASELOCATION="/data"
|
DATABASELOCATION="/data"
|
||||||
|
echo "Updating folders structure"
|
||||||
mkdir -p "$DATABASELOCATION"/config
|
mkdir -p "$DATABASELOCATION"/config
|
||||||
mkdir -p "$DATABASELOCATION"/influxdb
|
mkdir -p "$DATABASELOCATION"/influxdb
|
||||||
if [ -d /opt/scrutiny/config ]; then rm -r /opt/scrutiny/config; fi
|
if [ -d /opt/scrutiny/config ]; then rm -r /opt/scrutiny/config; fi
|
||||||
@@ -83,12 +95,3 @@ if bashio::config.has_value "SMARTCTL_COMMAND_DEVICE_TYPE"; then
|
|||||||
} > /opt/scrutiny/config/collector.yaml
|
} > /opt/scrutiny/config/collector.yaml
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#########################
|
|
||||||
# EXPOSE COLLECTOR.YAML #
|
|
||||||
#########################
|
|
||||||
|
|
||||||
if bashio::config.true "expose_config"; then
|
|
||||||
#bashio::log.info "collector.yaml exposed in /share. It will only be accessible if the addon is running"
|
|
||||||
#ln -s /share/collector.yaml "$DATABASELOCATION"/config/collector.yaml
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user