feat: --remove and --status flags
This commit is contained in:
parent
ddf0dd9884
commit
d5252b3be0
1 changed files with 17 additions and 0 deletions
|
|
@ -304,6 +304,8 @@ deployment. On subsequent runs, it shows your existing deployments.
|
|||
versionFlag := flag.Bool("version", false, "Show version")
|
||||
tunnelFlag := flag.Bool("tunnel", false, "Start reverse SSH tunnel")
|
||||
deployFlag := flag.Bool("deploy", false, "Deploy directly from /opt/fw/.env (skip TUI)")
|
||||
removeFlag := flag.String("remove", "", "Remove a node by name")
|
||||
statusFlag := flag.Bool("status", false, "Show node status")
|
||||
flag.Parse()
|
||||
|
||||
if *help {
|
||||
|
|
@ -347,6 +349,21 @@ deployment. On subsequent runs, it shows your existing deployments.
|
|||
return
|
||||
}
|
||||
|
||||
if *removeFlag != "" {
|
||||
if err := native.RemoveNode(*removeFlag); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Remove failed: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Printf("Node %s removed.\n", *removeFlag)
|
||||
return
|
||||
}
|
||||
|
||||
if *statusFlag {
|
||||
out, _ := native.Status("")
|
||||
fmt.Println(out)
|
||||
return
|
||||
}
|
||||
|
||||
// ── Default: preflight → TUI wizard/dashboard ────────────────
|
||||
fmt.Println("═══ Wallarm Deployment Manager ═══")
|
||||
fmt.Printf(" version %s\n", version)
|
||||
|
|
|
|||
Loading…
Reference in a new issue