iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor fix
[distro-setup]
/
mailtest-check
diff --git
a/mailtest-check
b/mailtest-check
index 9b41954f1106476707afbf7e4d5202105faca73f..363401780546c8849ded6acedf7242cd0adfbaec 100755
(executable)
--- a/
mailtest-check
+++ b/
mailtest-check
@@
-96,9
+96,12
@@
pr() {
cat >>/var/lib/prometheus/node-exporter/mailtest-check.prom.$$
fi
}
cat >>/var/lib/prometheus/node-exporter/mailtest-check.prom.$$
fi
}
-pr <<EOF
+# first time we write, overwrite anything existing
+if [[ -e /var/lib/prometheus/node-exporter ]]; then
+ cat >/var/lib/prometheus/node-exporter/mailtest-check.prom.$$ <<EOF
mailtest_check_found_spamd_pid_bool $(( ${spamdpid:-0} > 0 ))
EOF
mailtest_check_found_spamd_pid_bool $(( ${spamdpid:-0} > 0 ))
EOF
+fi
e spamdpid: $spamdpid
if [[ ! $spamdpid ]]; then
echo $HOSTNAME mailtest spamd pid not found. systemctl status spamassassin:
e spamdpid: $spamdpid
if [[ ! $spamdpid ]]; then
echo $HOSTNAME mailtest spamd pid not found. systemctl status spamassassin: