X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=mailtest-check;h=03cf6ab7135ddb4ee8b1f33b669340e816ec967c;hp=e28d5ae966750233f5778c20c26a7c1d58be54a6;hb=56c55d8e02cdd6ec67d2fe53cc03785d8876442e;hpb=da085f71e5ae00a9f78ed903be6ae675f66eacfa diff --git a/mailtest-check b/mailtest-check index e28d5ae..03cf6ab 100755 --- a/mailtest-check +++ b/mailtest-check @@ -29,7 +29,7 @@ getspamdpid() { fi } pr() { - if [[ -e /var/lib/prometheus/node-exporter ]]; then + if $doprom && [[ -e /var/lib/prometheus/node-exporter ]]; then cat >>/var/lib/prometheus/node-exporter/mailtest-check.prom.$$ fi } @@ -66,7 +66,17 @@ fi # TODO, get je to deliver the local mailbox: /m/md/INBOX # dovecot appears to setup, i can t be sure. - +source /a/bin/bash_unpublished/source-state + +doprom=false +case $HOSTNAME in + $MAIL_HOST|bk|je) + doprom=true + ;; + *) + rm -f /var/lib/prometheus/node-exporter/mailtest-check.prom* + ;; +esac main() {