fix: remove /opt/wallarm symlink after deploy
This commit is contained in:
parent
944df2d394
commit
8ea81cdb17
1 changed files with 8 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue