This adds a standard gate that prevents execution if a file exists. Of note, this also adds a watch on it, so we can have a proper watched exec resource without a watch cmd.
7 lines
158 B
Plaintext
7 lines
158 B
Plaintext
exec "exec0" {
|
|
cmd => "echo hello world > /tmp/whatever",
|
|
shell => "/bin/bash",
|
|
|
|
creates => "/tmp/whatever", # a watch event is taken on this file path!
|
|
}
|