fix: add --keep flag to prevent Makeself from deleting /opt/wallarm on failure

This commit is contained in:
admin 2026-08-01 16:52:40 +00:00
parent 7875dbca13
commit af8df1a659

View file

@ -48,7 +48,7 @@ func InstallNode(node state.Node, apiToken, apiHost, labels string) error {
// 3. Extract once // 3. Extract once
if _, err := os.Stat(filepath.Join(archiveDir, "setup.sh")); os.IsNotExist(err) { if _, err := os.Stat(filepath.Join(archiveDir, "setup.sh")); os.IsNotExist(err) {
fmt.Printf("[%s] Extracting...\n", node.Name) fmt.Printf("[%s] Extracting...\n", node.Name)
cmd := exec.Command("bash", installerPath, "--noexec", "--target", archiveDir, "--noprogress", "--accept") cmd := exec.Command("bash", installerPath, "--noexec", "--keep", "--target", archiveDir, "--noprogress", "--accept")
if out, err := cmd.CombinedOutput(); err != nil { if out, err := cmd.CombinedOutput(); err != nil {
return fmt.Errorf("extract: %w\n%s", err, string(out)) return fmt.Errorf("extract: %w\n%s", err, string(out))
} }