diff --git a/README.md b/README.md index c8c5008..1354418 100644 --- a/README.md +++ b/README.md @@ -277,7 +277,7 @@ The following configuration settings may be applied (a `Y` in column `$` means a | `OTR_LUASCRIPT` | | | Path to the Lua script | `OTR_PRECISION` | | `7` | Reverse-geo precision | `OTR_GEOKEY` | | | API key for reverse-geo lookups -| `OTR_BROWSERAPIKEY` | | | Google maps browser API key +| `OTR_BROWSERAPIKEY` | Y | | Google maps browser API key | `OTR_TOPICS` | | | String containing a space-separated list of topics to subscribe to for MQTT (overridden by command-line arguments) | `OTR_CAFILE` | Y | | Path to PEM-encoded CA certificate file for MQTT (implicitly enables TLS) diff --git a/recorder.c b/recorder.c index c6564a1..59ed26f 100644 --- a/recorder.c +++ b/recorder.c @@ -1278,6 +1278,11 @@ int main(int argc, char **argv) } #endif + if ((p = getenv("OTR_BROWSERAPIKEY")) != NULL) { + if (ud->browser_apikey) + free(ud->browser_apikey); + ud->browser_apikey = strdup(p); + } while (1) { static struct option long_options[] = {