Browse Source

Re-add pid file

main
Samuel Sloniker 1 year ago
parent
commit
21e0317979
  1. 11
      adsms.py

11
adsms.py

@ -83,4 +83,13 @@ if __name__ == "__main__":
args = parser.parse_args()
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"])

Loading…
Cancel
Save