+[common]
+# comma-separated list of tracker protocols to accept
+protocols = zx303proto,beesure
+
[collector]
# configure your gps terminal with this SMS:
# "server#<your_server_ip_or_fqdn>#4303#"
port = 4303
publishurl = ipc:///var/lib/loctrkd/collected
listenurl = ipc:///var/lib/loctrkd/responses
-# comma-separated list of tracker protocols to accept
-protocols = zx303proto
[wsgateway]
port = 5049
# "opencellid" and "googlemaps" can be here. Both require an access token,
# though googlemaps is only online, while opencellid backend looks up a
# local database, that can be updated once a week or once a month.
-backend = opencellid
+lookaside = opencellid
+publishurl = ipc:///var/lib/loctrkd/rectified
[opencellid]
dbfn = /var/lib/opencellid/opencellid.sqlite
downloadtoken = /var/lib/opencellid/opencellid.token
downloadmcc = 262
+# For googlemaps lookaside backend, specify the token
+# [googlemaps]
+# accesstoken = google.token
+
[termconfig]
statusIntervalMinutes = 25
uploadIntervalSeconds = 0x0300
global pmods
pmods = [
cast(ProtoModule, import_module("." + modnm, __package__))
- for modnm in conf.get("collector", "protocols").split(",")
+ for modnm in conf.get("common", "protocols").split(",")
]
# Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?!
zctx = zmq.Context() # type: ignore
global pmods
pmods = [
cast(ProtoModule, import_module("." + modnm, __package__))
- for modnm in conf.get("collector", "protocols").split(",")
+ for modnm in conf.get("common", "protocols").split(",")
]
# Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?!
zctx = zmq.Context() # type: ignore
global pmods
pmods = [
cast(ProtoModule, import_module("." + modnm, __package__))
- for modnm in conf.get("collector", "protocols").split(",")
+ for modnm in conf.get("common", "protocols").split(",")
]
db = connect(conf.get("storage", "dbfn"))
c = db.cursor()
global pmods
pmods = [
cast(ProtoModule, import_module("." + modnm, __package__))
- for modnm in conf.get("collector", "protocols").split(",")
+ for modnm in conf.get("common", "protocols").split(",")
]
db = connect(conf.get("storage", "dbfn"))
c = db.cursor()
def runserver(conf: ConfigParser) -> None:
- qry = import_module("." + conf.get("rectifier", "backend"), __package__)
+ qry = import_module("." + conf.get("rectifier", "lookaside"), __package__)
qry.init(conf)
# Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?!
zctx = zmq.Context() # type: ignore
global pmods
pmods = [
cast(ProtoModule, import_module("." + modnm, __package__))
- for modnm in conf.get("collector", "protocols").split(",")
+ for modnm in conf.get("common", "protocols").split(",")
]
# Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?!
zctx = zmq.Context() # type: ignore
global htmlfile, pmods, selector
pmods = [
cast(ProtoModule, import_module("." + modnm, __package__))
- for modnm in conf.get("collector", "protocols").split(",")
+ for modnm in conf.get("common", "protocols").split(",")
]
for pmod in pmods:
for proto, is_incoming in pmod.exposed_protos():
freeports.append(sk.getsockname()[1])
_, self.tmpfilebase = mkstemp()
self.conf = ConfigParser()
+ self.conf["common"] = {
+ "protocols": "zx303proto",
+ }
self.conf["collector"] = {
"port": str(freeports[0]),
"publishurl": "ipc://" + self.tmpfilebase + ".pub",
"listenurl": "ipc://" + self.tmpfilebase + ".pul",
- "protocols": "zx303proto",
}
self.conf["storage"] = {
"dbfn": self.tmpfilebase + ".storage.sqlite",
"downloadurl": f"http://localhost:{freeports[2]}/test/262.csv.gz",
}
self.conf["rectifier"] = {
- "backend": "opencellid",
+ "lookaside": "opencellid",
}
self.conf["wsgateway"] = {
"port": str(freeports[1]),