mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 20:55:47 +01:00
- README.md: update minimal example (was outdated since a long time 🤐) - README.md: link to Security part of the wiki - README.md: fix OpenBSD broken link - README.md: add `state_directory` option - activitywatch & server configs: remove from config directory. only available in the wiki. - heavy-load: move to new bench directory - test: move to tests directory Fix #121
47 lines
889 B
Jsonnet
47 lines
889 B
Jsonnet
{
|
|
patterns: {
|
|
num: {
|
|
regex: '[0-9]+',
|
|
ignore: ['1'],
|
|
// ignoreregex: ['2.?'],
|
|
},
|
|
letter: {
|
|
regex: '[a-z]+',
|
|
ignore: ['b'],
|
|
// ignoreregex: ['b.?'],
|
|
},
|
|
},
|
|
|
|
start: [
|
|
['echo', 'coucou'],
|
|
],
|
|
|
|
stop: [
|
|
['echo', 'byebye'],
|
|
],
|
|
|
|
streams: {
|
|
s1: {
|
|
cmd: ['sh', '-c', "seq 20 | tr ' ' '\n' | while read i; do echo found $((i % 5)); sleep 1; done"],
|
|
filters: {
|
|
f1: {
|
|
regex: [
|
|
'^found <num>$',
|
|
],
|
|
retry: 2,
|
|
retryperiod: '60s',
|
|
actions: {
|
|
damn: {
|
|
cmd: ['notify-send', 'first stream', 'ban <num>'],
|
|
},
|
|
undamn: {
|
|
cmd: ['notify-send', 'first stream', 'unban <num>'],
|
|
after: '3s',
|
|
onexit: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|