From bf3ba4117928db3249a5a32c533c3155dee5dd14 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 1 Aug 2026 19:26:52 +0000 Subject: [PATCH] feat: start Wallarm via supervisord after registration --- internal/native/native.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/native/native.go b/internal/native/native.go index 7e8591c..7aef950 100644 --- a/internal/native/native.go +++ b/internal/native/native.go @@ -95,7 +95,14 @@ func InstallNode(node state.Node, apiToken, apiHost, labels string) error { return fmt.Errorf("register: %w\n%s", regErr, string(out)) } - // 7. Move /opt/wallarm → /opt/fw/{name}/wallarm + // 7. Stop our temporary NGINX, start Wallarm via supervisord + exec.Command("pkill", "-f", filepath.Join(DeployTo, "nginx")).Run() + supervisorCmd := exec.Command("bash", filepath.Join(DeployTo, "supervisord.sh"), "start") + supervisorCmd.Dir = DeployTo + supervisorCmd.Run() + fmt.Printf("[%s] Services started.\n", node.Name) + + // 8. Move /opt/wallarm → /opt/fw/{name}/wallarm os.MkdirAll(filepath.Join(BaseDir, node.Name), 0755) os.RemoveAll(instanceDir) os.Rename(DeployTo, instanceDir)