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)