]> www.average.org Git - loctrkd.git/commitdiff
cleanup and document config file a bit
authorEugene Crosser <crosser@average.org>
Thu, 26 May 2022 12:50:05 +0000 (14:50 +0200)
committerEugene Crosser <crosser@average.org>
Thu, 26 May 2022 12:50:05 +0000 (14:50 +0200)
debian/gps303.conf
gps303/lookaside.py

index 3b2ca38a6211cc5fe91ec38e1c18556fc38703ce..f19b4af8e3adad3f21f6d757a639aebb3f4ba5de 100644 (file)
@@ -1,4 +1,6 @@
 [collector]
+# configure your gps terminal with this SMS:
+# "server#<your_server_ip_or_fqdn>#4303#"
 port = 4303
 publishurl = ipc:///var/lib/gps303/collected
 listenurl = ipc:///var/lib/gps303/responses
@@ -11,10 +13,14 @@ htmlfile = /var/lib/gps303/index.html
 dbfn = /var/lib/gps303/gps303.sqlite
 
 [lookaside]
-publishurl = ipc:///var/lib/gps303/locevt
+# "opencellid" is the only implemented backend for the time being
+backend = opencellid
 
 [opencellid]
 dbfn = /var/lib/opencellid/opencellid.sqlite
+# for testing: run `python -m http.server --directory <your_dir>` and use this:
+# downloadurl = http://localhost:8000/<your_mcc>.csv.gz
+# then the next two statements will be ignored
 downloadtoken = /var/lib/opencellid/opencellid.token
 downloadmcc = 262
 
index 136ade9aeccf51e836062e8bfb0e83130c9544a4..b42ce06f378a5ae10fe9a642475556ab577d6859 100644 (file)
@@ -15,6 +15,10 @@ log = getLogger("gps303/lookaside")
 
 
 def runserver(conf):
+    if conf.get("lookaside", "backend") != "opencellid":
+        raise NotImplementedError(
+            "Lookaside only implements opencellid backend"
+        )
     zctx = zmq.Context()
     zsub = zctx.socket(zmq.SUB)
     zsub.connect(conf.get("collector", "publishurl"))