chiark / gitweb /
probes: Fix "read message" for if the message is empty
[modbot-ulm.git] / probes / modrelays-probe
index 6245c82804543dde67dafb66600b4019b00048d9..22f00a718413f96eef809b89a6a0ef35981cb6b5 100755 (executable)
@@ -6,6 +6,8 @@ MODRELAYS=moderators.isc.org
 PROBE_TIMEOUT=$(( 20 * 60 ))
 PROBE_EXPIRE=$(( 32 * 86400 ))
 
+shopt -s nullglob
+
 case "$1" in
 received)
        mode="$1"
@@ -229,7 +231,7 @@ maybe-report () {
        if ! [ -e "$attempt/$outcome" ]; then return; fi
        found_to_report=true
 
-       read <"$attempt/$outcome" message
+       message=$(cat "$attempt/$outcome")
 
        local reported
        if [ -e "$attempt/reported" ]; then