1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-23 16:38:40 -05:00

Updated server client checks

Moved the client settings and configuration checks prior to
trying to start the client.
This commit is contained in:
Hemna 2024-11-20 18:01:21 -05:00
parent 06c1fb985e
commit 1c50c39e61

View File

@ -54,6 +54,15 @@ def server(ctx, flush):
LOG.error("No Clients are enabled in config.")
sys.exit(-1)
# Make sure we have 1 client transport enabled
if not client_factory.is_client_enabled():
LOG.error("No Clients are enabled in config.")
sys.exit(-1)
if not client_factory.is_client_configured():
LOG.error("APRS client is not properly configured in config file.")
sys.exit(-1)
# Creates the client object
LOG.info("Creating client connection")
aprs_client = client_factory.create()
@ -86,15 +95,6 @@ def server(ctx, flush):
for p in watchlist_plugins:
LOG.info(p)
# Make sure we have 1 client transport enabled
if not client_factory.is_client_enabled():
LOG.error("No Clients are enabled in config.")
sys.exit(-1)
if not client_factory.is_client_configured():
LOG.error("APRS client is not properly configured in config file.")
sys.exit(-1)
if not CONF.enable_seen_list:
# just deregister the class from the packet collector
packet_collector.PacketCollector().unregister(seen_list.SeenList)