engine: resources: Add a nif command and make it clearer

Let's have the opposite, and have an example so you don't forget which
is which.
This commit is contained in:
James Shubin
2025-10-02 20:48:36 -04:00
parent 5f4ae05340
commit 6c6c9df75e
2 changed files with 140 additions and 3 deletions

20
examples/lang/exec-if.mcl Normal file
View File

@@ -0,0 +1,20 @@
exec "i will run 1" {
cmd => "/usr/bin/echo i WILL run",
ifcmd => "/usr/bin/true",
}
exec "i will not run 2" {
cmd => "/usr/bin/echo i will NOT run",
ifcmd => "/usr/bin/false",
}
# nifcmd exited with: 0, skipping cmd
exec "i will not run 1" {
cmd => "/usr/bin/echo i will NOT run",
nifcmd => "/usr/bin/true",
}
exec "i will run 2" {
cmd => "/usr/bin/echo i WILL run",
nifcmd => "/usr/bin/false",
}