Compare commits
2 Commits
8f0ba1b33d
...
21e0317979
Author | SHA1 | Date | |
---|---|---|---|
21e0317979 | |||
16d7649e45 |
11
adsms.py
11
adsms.py
|
@ -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"])
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user