feat: start Wallarm via supervisord after registration
This commit is contained in:
parent
b01f5d6a52
commit
bf3ba41179
1 changed files with 8 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue