mirror of
https://github.com/owntracks/recorder.git
synced 2026-02-13 20:49:51 +00:00
FIX: support OTR_HTTPHOST and OTR_HTTPPORT configuration in environment
addresses https://github.com/owntracks/recorder/issues/388 addresses https://github.com/owntracks/frontend/issues/85 addresses https://github.com/owntracks/docker-recorder/issues/54 addresses https://github.com/owntracks/docker-recorder/issues/55 addresses https://github.com/owntracks/docker-recorder/issues/58
This commit is contained in:
@@ -282,8 +282,8 @@ The following configuration settings may be applied (a `Y` in column `$` means a
|
||||
| `OTR_PASS` | Y | | MQTT password
|
||||
| `OTR_QOS` | | `2` | MQTT QoS
|
||||
| `OTR_CLIENTID` | | hostname+pid | MQTT ClientID (override with -i)
|
||||
| `OTR_HTTPHOST` | | `localhost` | Address for the HTTP module to bind to
|
||||
| `OTR_HTTPPORT` | | `8083` | Port number of the HTTP module to bind to
|
||||
| `OTR_HTTPHOST` | Y | `localhost` | Address for the HTTP module to bind to
|
||||
| `OTR_HTTPPORT` | Y | `8083` | Port number of the HTTP module to bind to
|
||||
| `OTR_HTTPLOGDIR` | | | Directory in which to store access.log. Override with --http-logdir
|
||||
| `OTR_LUASCRIPT` | | | Path to the Lua script
|
||||
| `OTR_PRECISION` | | `7` | Reverse-geo precision
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* OwnTracks Recorder
|
||||
* Copyright (C) 2015-2020 Jan-Piet Mens <jpmens@gmail.com>
|
||||
* Copyright (C) 2015-2022 Jan-Piet Mens <jpmens@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -1336,6 +1336,13 @@ int main(int argc, char **argv)
|
||||
free(ud->browser_apikey);
|
||||
ud->browser_apikey = strdup(p);
|
||||
}
|
||||
if ((p = getenv("OTR_HTTPHOST")) != NULL) {
|
||||
ud->http_host = strdup(p);
|
||||
}
|
||||
|
||||
if ((p = getenv("OTR_HTTPPORT")) != NULL) {
|
||||
ud->http_port = atoi(p);
|
||||
}
|
||||
#endif
|
||||
|
||||
while (1) {
|
||||
|
||||
Reference in New Issue
Block a user