From d8d71c5a22d58ff5ddb9e8cf59d0e72465cc31c3 Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 10 May 2019 16:17:13 +0200 Subject: [PATCH] action.d/helpers-common.conf: grep arguments are rewritten - using options `-wF` to match only whole words and fixed string (not as pattern) --- config/action.d/helpers-common.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/action.d/helpers-common.conf b/config/action.d/helpers-common.conf index 195de60d..03422a87 100644 --- a/config/action.d/helpers-common.conf +++ b/config/action.d/helpers-common.conf @@ -4,8 +4,9 @@ # _grep_logs_args = 'test' # (printf %%b "Log-excerpt contains 'test':\n"; %(_grep_logs)s; printf %%b "Log-excerpt contains 'test':\n") | mail ... # -_grep_logs = logpath=""; grep -E %(_grep_logs_args)s $logpath | -_grep_logs_args = "(^|[^0-9a-fA-F:])$(echo '' | sed 's/\./\\./g')(:\d{1,5})?([^0-9a-fA-F:]|$)" +_grep_logs = logpath=""; grep %(_grep_logs_args)s $logpath | +# options `-wF` used to match only whole words and fixed string (not as pattern) +_grep_logs_args = -wF "" # Used for actions, that should not by executed if ticket was restored: _bypass_if_restored = if [ '' = '1' ]; then exit 0; fi;