Skip to content

Commit

Permalink
✨ Adds option to disable usage reporting to InfluxData
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Mar 31, 2019
1 parent 6ff2a23 commit b2a9a34
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Example add-on configuration:
{
"log_level": "info",
"auth": true,
"reporting": true,
"ssl": true,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions influxdb/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
"host_network": false,
"options": {
"auth": true,
"reporting": true,
"ssl": true,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
},
"schema": {
"log_level": "match(^(trace|debug|info|notice|warning|error|fatal)$)?",
"auth": "bool",
"reporting": "bool",
"ssl": "bool",
"certfile": "str",
"keyfile": "str",
Expand Down
9 changes: 9 additions & 0 deletions influxdb/rootfs/etc/cont-init.d/22-reporting.sh
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions influxdb/rootfs/etc/influxdb/influxdb.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
reporting-disabled = false
[meta]
dir = "/data/influxdb/meta"

Expand Down

0 comments on commit b2a9a34

Please sign in to comment.