Log the name of the config in use
This commit is contained in:
parent
7a95b46c73
commit
a8e02ddcd3
2 changed files with 3 additions and 3 deletions
|
@ -19,13 +19,14 @@ if __name__ == "__main__":
|
|||
for path in sys.argv[1:]:
|
||||
try:
|
||||
cfg = load_cfg(path)
|
||||
print("> using %s" %(path))
|
||||
break
|
||||
except Exception as e:
|
||||
print("! cfg file %s failed to load (%s)" %(path, e))
|
||||
|
||||
|
||||
if not cfg:
|
||||
print("!!! unable to load any configuration")
|
||||
print("! unable to load any configuration")
|
||||
sys.exit(1)
|
||||
|
||||
command = ["/usr/bin/ssh", "-o", "ServerAliveInterval 45", "-o", "ServerAliveCountMax 2", "-o", "ExitOnForwardFailure yes", "-N"]
|
||||
|
@ -36,5 +37,4 @@ if __name__ == "__main__":
|
|||
|
||||
command.append("%s@%s" %(cfg["user"], cfg["host"]))
|
||||
|
||||
# replace this process, systemd will restart us if needed
|
||||
subprocess.run(command)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue