diff --git a/README.md b/README.md index 15c08f4..f437635 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,17 @@ Non-TPDU messages (ATR, PPS, card state changes, Fi/Di) print identically in all - **GSMTAP**: ATR (subtype 1) and TPDU (subtype 2) over UDP to Wireshark - **PCAP**: all messages as GSMTAP-encapsulated packets (LINKTYPE 155), openable in Wireshark +## Background / Daemon + +SIGHUP is ignored by default — terminal closure won't kill the sniffer. +To run persistently in the background with output to files: + +```sh +nohup ./sniff-start.sh --output /tmp/sniff.log &> /tmp/sniff-err.log & +# or +FORMAT=timestamp nohup python -m simtrace2_pysniff --output /tmp/sniff.log &> /tmp/sniff-err.log & +``` + ## Library Usage ```python diff --git a/simtrace2_pysniff/__main__.py b/simtrace2_pysniff/__main__.py index 5235774..4b49d82 100644 --- a/simtrace2_pysniff/__main__.py +++ b/simtrace2_pysniff/__main__.py @@ -131,6 +131,7 @@ def main(): file_dumper.close() sys.exit(0) + signal.signal(signal.SIGHUP, signal.SIG_IGN) signal.signal(signal.SIGINT, on_signal) signal.signal(signal.SIGTERM, on_signal)