Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook Notice::notice(n: Notice::Info){
- if ( ACTION_RUNSCRIPT in n$actions ){
- local ts = fmt("%s", null n$ts ? n$ts : "");
- local args=fmt("\"ts=%s;;;uid=%s;;;proto=%s;;;note=%s;;;msg=%s;;;sub=%s;;;src=%s;;;dst=%s;;;p=%s;;;identifier=%s\"",ts,n$uid,n$proto,n$note,n$msg,n$sub,n$src,n$dst,n$p,n$identifier);
- when ( local result = Exec::run([$cmd=fmt("/usr/bin/myscript %s", args)]) ){
- n$msg += fmt(" ran script for %s -> %s", n$src, n$dst);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement