Compare commits

..

2 Commits

Author SHA1 Message Date
21e0317979 Re-add pid file 2023-05-06 09:22:10 -07:00
16d7649e45 Fix mismatch between installer and config 2023-05-06 09:19:04 -07:00
2 changed files with 11 additions and 2 deletions

View File

@ -83,4 +83,13 @@ if __name__ == "__main__":
args = parser.parse_args() args = parser.parse_args()
config = load_config(args.config_file) config = load_config(args.config_file)
run(config)
try:
if config["pid_file"]:
with open(config["pid_file"], "w+") as f:
f.write(str(os.getpid()))
run(config)
finally:
if config["pid_file"]:
os.unlink(config["pid_file"])

View File

@ -2,7 +2,7 @@
"textbelt_key": "API_KEY", "textbelt_key": "API_KEY",
"data": "http://localhost/tar1090/data/aircraft.json", "data": "http://localhost/tar1090/data/aircraft.json",
"tracker": "https://globe.theairtraffic.com/", "tracker": "https://globe.theairtraffic.com/",
"database": "/var/lib/adsms/subscriptions.db", "database": "/var/lib/adsms/subscribers.db",
"pid_file": "/var/lib/adsms/pid.txt", "pid_file": "/var/lib/adsms/pid.txt",
"max_age": 30, "max_age": 30,
"min_disappearance": 120, "min_disappearance": 120,