mirror of
https://github.com/craigerl/aprsd.git
synced 2025-09-04 22:27:50 -04:00
Added SIGTERM to signal_handler
This commit is contained in:
parent
0d51634ec2
commit
8ee8b149f1
@ -432,6 +432,7 @@ def server(
|
|||||||
"""Start the aprsd server process."""
|
"""Start the aprsd server process."""
|
||||||
global flask_enabled
|
global flask_enabled
|
||||||
signal.signal(signal.SIGINT, signal_handler)
|
signal.signal(signal.SIGINT, signal_handler)
|
||||||
|
signal.signal(signal.SIGTERM, signal_handler)
|
||||||
|
|
||||||
if not quiet:
|
if not quiet:
|
||||||
click.echo("Load config")
|
click.echo("Load config")
|
||||||
@ -481,6 +482,7 @@ def server(
|
|||||||
messaging.MsgTrack().flush()
|
messaging.MsgTrack().flush()
|
||||||
packets.PacketList(config=config)
|
packets.PacketList(config=config)
|
||||||
packets.WatchList(config=config)
|
packets.WatchList(config=config)
|
||||||
|
packets.SeenList(config=config)
|
||||||
else:
|
else:
|
||||||
# Try and load saved MsgTrack list
|
# Try and load saved MsgTrack list
|
||||||
LOG.debug("Loading saved MsgTrack object.")
|
LOG.debug("Loading saved MsgTrack object.")
|
||||||
|
@ -76,7 +76,9 @@ class WatchList(objectstore.ObjectStoreMixin):
|
|||||||
if cls._instance is None:
|
if cls._instance is None:
|
||||||
cls._instance = super().__new__(cls)
|
cls._instance = super().__new__(cls)
|
||||||
cls._instance.lock = threading.Lock()
|
cls._instance.lock = threading.Lock()
|
||||||
cls.data = {}
|
cls._instance.config = kwargs["config"]
|
||||||
|
cls._instance.data = {}
|
||||||
|
cls._instance._init_store()
|
||||||
return cls._instance
|
return cls._instance
|
||||||
|
|
||||||
def __init__(self, config=None):
|
def __init__(self, config=None):
|
||||||
@ -97,7 +99,6 @@ class WatchList(objectstore.ObjectStoreMixin):
|
|||||||
ring_size,
|
ring_size,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
self._init_store()
|
|
||||||
|
|
||||||
def is_enabled(self):
|
def is_enabled(self):
|
||||||
if self.config and "watch_list" in self.config["aprsd"]:
|
if self.config and "watch_list" in self.config["aprsd"]:
|
||||||
@ -163,14 +164,11 @@ class SeenList(objectstore.ObjectStoreMixin):
|
|||||||
if cls._instance is None:
|
if cls._instance is None:
|
||||||
cls._instance = super().__new__(cls)
|
cls._instance = super().__new__(cls)
|
||||||
cls._instance.lock = threading.Lock()
|
cls._instance.lock = threading.Lock()
|
||||||
cls.data = {}
|
cls._instance.config = kwargs["config"]
|
||||||
|
cls._instance.data = {}
|
||||||
|
cls._instance._init_store()
|
||||||
return cls._instance
|
return cls._instance
|
||||||
|
|
||||||
def __init__(self, config=None):
|
|
||||||
if config:
|
|
||||||
self.config = config
|
|
||||||
self._init_store()
|
|
||||||
|
|
||||||
def update_seen(self, packet):
|
def update_seen(self, packet):
|
||||||
callsign = None
|
callsign = None
|
||||||
if "fromcall" in packet:
|
if "fromcall" in packet:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user