Jan-Piet Mens
2022-08-02 15:13:04 +02:00
parent 582b283aff
commit 10a194ad78
2 changed files with 10 additions and 3 deletions

View File

@@ -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

View File

@@ -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) {