From: Ian Jackson Date: Tue, 10 Oct 2017 15:40:05 +0000 (+0100) Subject: probes: start running it from cron, and some debugging X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?a=commitdiff_plain;h=e63a420fedde3ff2f6980546b2f927ad83f21ad2;hp=f4d01f7105ceed5856c888c38c9cc83048a3bfa7;p=modbot-mtm.git probes: start running it from cron, and some debugging --- 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