I'm using cfengine to start the foobar process. Apparently the LHS is discarded when I use process_select? Can I simply pass the LHS to a function, rather than having to put the command match pattern in a body argument?
I wanted to only match foobar
processes belonging to a particular user, since another user could easily be running foobar
for testing.
bundle agent foobar {
processes:
"foobar" # documented way would be to use .* here
process_select => command("foobar"),
restart_class => start_foobar;
commands:
start_foobar::
"/usr/bin/foobar";
}
body process_select command(c) {
command => "$(c)";
process_result => "command";
}