mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
[plugins/whois_] stop EXTRACT_RE after the first match
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
parent
a10647b95e
commit
0ab1e127a2
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ fetch() {
|
|||
CACHEFILE="${MUNIN_PLUGSTATE}/$(basename "${0}").${FIELDNAME}.cache"
|
||||
|
||||
if [ -z "$(find "${CACHEFILE}" -mmin -${CACHE_EXPIRY} 2>/dev/null)" ]; then
|
||||
EXPIRY="$(whois "${NAME}" 2>/dev/null | sed -n "${EXTRACT_RE}p")"
|
||||
EXPIRY="$(whois "${NAME}" 2>/dev/null | sed -n "${EXTRACT_RE}p;T;q")" # T;q exits after printing the first match
|
||||
DELTA_TS=U
|
||||
if [ -n "${EXPIRY}" ]; then
|
||||
EXPIRY_TS="$(date +%s -d "${EXPIRY}")"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue