fix: move main() call to end of file after all function defs

This commit is contained in:
admin 2026-08-03 16:11:02 +00:00
parent 6a79d6b5b6
commit 9d10516a63

View file

@ -248,9 +248,7 @@ def edit_menu():
with open(CONF, "w") as f: json.dump(cfg, f, indent=2)
print(f"{name} updated in fw.conf. Re-deploy to apply changes.")
if __name__ == "__main__":
main()
def start_tunnel():
host = input("Jumphost URL [ssh.sechpoint.app:443]: ").strip() or "ssh.sechpoint.app:443"
user = input("Username [wallarm-tunnel]: ").strip() or "wallarm-tunnel"
@ -272,7 +270,6 @@ def start_tunnel():
print("Install paramiko: pip3 install paramiko")
except Exception as e:
print(f"Tunnel failed: {e}")
def edit_nodes():
s = load_state().get("nodes", [])
if not s: print("No nodes."); return
@ -297,7 +294,6 @@ def edit_nodes():
n['upstream_ip'] = ip; n['upstream_port'] = int(p)
save_state({"nodes": s})
print(f"✅ Updated. Restart to apply.")
def remove_menu():
s = load_state().get("nodes", [])
if not s: print("No nodes."); return
@ -309,3 +305,6 @@ def remove_menu():
idx = int(c) - 1
if 0 <= idx < len(s):
remove_container(s[idx]["name"])
if __name__ == "__main__":
main()