diff --git a/python/deploy.py b/python/deploy.py index d867527..b5a7997 100644 --- a/python/deploy.py +++ b/python/deploy.py @@ -201,6 +201,7 @@ WantedBy=multi-user.target run(f"systemctl enable wallarm-node@{name}") run(f"systemctl start wallarm-node@{name}") print(f"✅ {name} deployed. systemctl status wallarm-node@{name}") + return True # ─── Remove ──────────────────────────────────────────────────────────── @@ -386,6 +387,9 @@ def main(): elif c == "4": remove_menu() elif c == "5": start_tunnel() elif c.lower() == "q": break + # Clean up stray symlinks + if os.path.islink("/opt/wallarm"): + os.remove("/opt/wallarm") def deploy_all(): print("Deploying all from fw.conf...") @@ -402,6 +406,10 @@ def deploy_all(): str(nc.get("port","8081")), nc.get("upstream_ip","127.0.0.1"), str(nc.get("upstream_port","80")), nc.get("labels",f"group={name}"), nc.get("mode","monitoring")) + # Clean up + if os.path.islink("/opt/wallarm"): + os.remove("/opt/wallarm") + print("Done.") if __name__ == "__main__": main()