diff --git a/README.md b/README.md index 48311af..1508c1c 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Example add-on configuration: { "log_level": "info", "auth": true, + "reporting": true, "ssl": true, "certfile": "fullchain.pem", "keyfile": "privkey.pem" @@ -93,6 +94,12 @@ Enable or disable InfluxDB user authentication. **Note**: _Turning this off is NOT recommended!_ +### Option: `reporting` + +This option allows you to disable the reporting of usage data to InfluxData. + +**Note**: _No data from user databases is ever transmitted!_ + ### Option: `ssl` Enables/Disables SSL (HTTPS) on the web interface. diff --git a/influxdb/config.json b/influxdb/config.json index faddb0f..c489b1f 100755 --- a/influxdb/config.json +++ b/influxdb/config.json @@ -29,6 +29,7 @@ "host_network": false, "options": { "auth": true, + "reporting": true, "ssl": true, "certfile": "fullchain.pem", "keyfile": "privkey.pem" @@ -36,6 +37,7 @@ "schema": { "log_level": "match(^(trace|debug|info|notice|warning|error|fatal)$)?", "auth": "bool", + "reporting": "bool", "ssl": "bool", "certfile": "str", "keyfile": "str", diff --git a/influxdb/rootfs/etc/cont-init.d/22-reporting.sh b/influxdb/rootfs/etc/cont-init.d/22-reporting.sh new file mode 100644 index 0000000..ce5a227 --- /dev/null +++ b/influxdb/rootfs/etc/cont-init.d/22-reporting.sh @@ -0,0 +1,9 @@ +#!/usr/bin/with-contenv bashio +# ============================================================================== +# Community Hass.io Add-ons: InfluxDB +# Configures usage reporting to InfluxDB +# ============================================================================== +if bashio::config.false 'reporting'; then + sed -i 's/reporting-disabled=.*/reporting-disabled=true/' /etc/influxdb/influxdb.conf + bashio::log.info "Reporting of usage stats to InfluxData is disabled." +fi diff --git a/influxdb/rootfs/etc/influxdb/influxdb.conf b/influxdb/rootfs/etc/influxdb/influxdb.conf index ade2305..9853a18 100644 --- a/influxdb/rootfs/etc/influxdb/influxdb.conf +++ b/influxdb/rootfs/etc/influxdb/influxdb.conf @@ -1,3 +1,4 @@ +reporting-disabled = false [meta] dir = "/data/influxdb/meta"