1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-07-29 20:02:27 -04:00

Added rpc server for listen

Added the ability to start the rpc server for fetching stats from the
listen command.  If the rpc server is enabled in config, the rpc
server will now start.
This commit is contained in:
Hemna 2023-06-21 18:48:08 -04:00
parent 26c1e7afbb
commit 8b73372b6e

View File

@ -17,6 +17,7 @@ from rich.console import Console
import aprsd
from aprsd import cli_helper, client, packets, plugin, stats, threads
from aprsd.aprsd import cli
from aprsd.rpc import server as rpc_server
from aprsd.threads import rx
@ -181,6 +182,10 @@ def listen(
keepalive = threads.KeepAliveThread()
keepalive.start()
if CONF.rpc_settings.enabled:
rpc = rpc_server.APRSDRPCThread()
rpc.start()
pm = None
pm = plugin.PluginManager()
if load_plugins:
@ -204,3 +209,6 @@ def listen(
keepalive.join()
LOG.debug("listen_thread Join")
listen_thread.join()
if CONF.rpc_settings.enabled:
rpc.join()