mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

This is based on commit 2731def9159247e6da8a3191783c89683363689c from the zeek-docs repo.
23 lines
548 B
Text
23 lines
548 B
Text
event zeek_init()
|
|
{
|
|
if ( Supervisor::is_supervisor() )
|
|
{
|
|
local sn = Supervisor::NodeConfig($name="foo", $interface="en0");
|
|
local res = Supervisor::create(sn);
|
|
|
|
if ( res == "" )
|
|
print "supervisor created a new node";
|
|
else
|
|
print "supervisor failed to create node", res;
|
|
}
|
|
else
|
|
print fmt("supervised node '%s' zeek_init()", Supervisor::node()$name);
|
|
}
|
|
|
|
event zeek_done()
|
|
{
|
|
if ( Supervisor::is_supervised() )
|
|
print fmt("supervised node '%s' zeek_done()", Supervisor::node()$name);
|
|
else
|
|
print "supervisor zeek_done()";
|
|
}
|