mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Establish a separate init script when using the supervisor
The supervisor does not require the full weight of scripts that init-default.zeek brings with it. The new file, init-supervisor.zeek, contains only what's required by the supervisor in addition to the other always-loaded init files.
This commit is contained in:
parent
7bee79b400
commit
a3623bfb2d
2 changed files with 13 additions and 1 deletions
5
scripts/base/init-supervisor.zeek
Normal file
5
scripts/base/init-supervisor.zeek
Normal file
|
@ -0,0 +1,5 @@
|
|||
##! This script loads functionality needed by the supervisor. Zeek only sources
|
||||
##! this when the supervisor is active (-j). Like init-default.zeek, this isn't
|
||||
##! loaded in bare mode.
|
||||
|
||||
@load base/frameworks/supervisor
|
|
@ -532,7 +532,14 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
add_essential_input_file("base/init-frameworks-and-bifs.zeek");
|
||||
|
||||
if ( ! options.bare_mode )
|
||||
{
|
||||
// The supervisor only needs to load a limited set of
|
||||
// scripts, since it won't be doing traffic processing.
|
||||
if ( options.supervisor_mode )
|
||||
add_input_file("base/init-supervisor.zeek");
|
||||
else
|
||||
add_input_file("base/init-default.zeek");
|
||||
}
|
||||
|
||||
add_input_file("builtin-plugins/__preload__.zeek");
|
||||
add_input_file("builtin-plugins/__load__.zeek");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue