chiark
/
gitweb
/
~webstump
/
modbot-ulm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ced3fce
)
probes: Break out do-report-log
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 12 Oct 2017 17:29:44 +0000
(18:29 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 12 Oct 2017 17:29:44 +0000
(18:29 +0100)
No functional change.
probes/modrelays-probe
patch
|
blob
|
history
diff --git
a/probes/modrelays-probe
b/probes/modrelays-probe
index 22f00a718413f96eef809b89a6a0ef35981cb6b5..521a0403859efe1ac48e2c91722cf18fba80730a 100755
(executable)
--- a/
probes/modrelays-probe
+++ b/
probes/modrelays-probe
@@
-224,6
+224,11
@@
acquire_lock () {
exec with-lock-ex $lock_mode "$lockfile" "$0" "$mode" "$@"
}
exec with-lock-ex $lock_mode "$lockfile" "$0" "$mode" "$@"
}
+do-report-log () {
+ # implicitly uses $outcome, $reported etc. - see maybe-report
+ echo "$outcome" >"$attempt"/reported
+}
+
maybe-report () {
local outcome=$1
maybe-report () {
local outcome=$1
@@
-240,7
+245,7
@@
maybe-report () {
if [ "x$outcome" = "x$reported" ]; then return; fi
if [ x"$outcome" = x"ok" ] && [ x"$reported" = x ]; then
if [ "x$outcome" = "x$reported" ]; then return; fi
if [ x"$outcome" = x"ok" ] && [ x"$reported" = x ]; then
- echo ok >"$attempt/reported"
+ do-report-log
return
fi
return
fi
@@
-320,7
+325,7
@@
END
END
/usr/sbin/sendmail -odb -oem -oee -t <"$email"
END
/usr/sbin/sendmail -odb -oem -oee -t <"$email"
- echo "$outcome" >"$attempt"/reported
+ do-report-log
}
mode_report () {
}
mode_report () {