Skip to content

Commit

Permalink
Refactor command execution to use a dynamic script path and also adde…
Browse files Browse the repository at this point in the history
…d comments

Signed-off-by: GLVS Kiriti <[email protected]>
  • Loading branch information
GLVSKiriti committed Mar 26, 2024
1 parent d9a9e58 commit 5b5139a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions events/syscall/execution_from_dev_shm.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func ExecutionFromDevShm(h events.Helper) error {
return err
}

cmd := exec.Command("sh", "-c", "cd /dev/shm/ && ./example_script-created-by-falco-event-generator.sh")
defer os.Remove(scriptPath) // Remove script file
cmd := exec.Command("sh", "-c", scriptPath) // Execute script file
defer os.Remove(scriptPath) // Remove script file
return cmd.Run()
}

0 comments on commit 5b5139a

Please sign in to comment.