From e63a420fedde3ff2f6980546b2f927ad83f21ad2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 10 Oct 2017 16:40:05 +0100 Subject: [PATCH] probes: start running it from cron, and some debugging --- crontab.part.INO | 2 ++ probes/modrelays-probe | 10 ++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/crontab.part.INO b/crontab.part.INO index 537dc72..5bb1643 100644 --- a/crontab.part.INO +++ b/crontab.part.INO @@ -7,3 +7,5 @@ 51 7 12 * * savelog -p live-%ABBREV%/errs 52 7 12 * * savelog -p live-%ABBREV%/webstump/log/webstump.log 53 7 * * 1 find live-%ABBREV%/xlog/log/%GROUP%/public -mtime +14 -type f -print0 | xargs -r0 rm -- +42 * * * * cd %BASEDIR% && probes/modrelays-probe all +3-59/5 * * * * cd %BASEDIR% && probes/modrelays-probe report diff --git a/probes/modrelays-probe b/probes/modrelays-probe index a817a85..79e8ab7 100755 --- a/probes/modrelays-probe +++ b/probes/modrelays-probe @@ -209,7 +209,7 @@ probe-domain () { } no_args () { - case $# in + case $1 in 0) return ;; *) fail "no arguments to $mode allowed" ;; esac @@ -352,7 +352,7 @@ mode_report () { } mode_received () { - no_args + no_args $# local hn group id domain mx addr while read hn group id domain mx addr; do @@ -372,12 +372,6 @@ mode_all () { done } -mode_auto () { - no_args $# - xxx do something to cause sleeping - mode_all -} - mode_domain () { for domain in "$@"; do probe-domain $domain -- 2.30.2