X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=system-status;h=0ab88b4d533a4ee4f2d01e2a0751f6a63f658458;hp=e01b15b6346af812f68779b88dcb4d2864f274de;hb=c578efcab3f35b96b1b3e4e7248f0fa24d815594;hpb=2f7b266e782347022b68c5c8e8fbe9292492c343 diff --git a/system-status b/system-status index e01b15b..0ab88b4 100755 --- a/system-status +++ b/system-status @@ -36,7 +36,7 @@ write-status() { chars+=("MAILPING!") fi - qlen=$(/usr/sbin/exim -bpc) + qlen=$(/usr/sbin/exiqgrep -o 60 -c -b | awk '{print $1}') if ((qlen)); then chars+=("q $qlen") fi @@ -82,7 +82,7 @@ write-status() { spamcount=0 fi if (( spamcount <= 4 )); then - if grep -q 'spam acl condition' /var/log/exim4/paniclog; then + if grep -q 'spam acl condition' /var/log/exim4/paniclog &>/dev/null; then printf . >>$loglog fi /a/bin/distro-setup/epanic-clean @@ -136,6 +136,7 @@ write-status() { fi } +# use this if we want to do something just once per minute first_chars=() power=true @@ -143,22 +144,6 @@ if [[ -e /sys/class/power_supply/AC/online && $(/dev/null) && [[ $c && $c != 0 ]]; then - msg=q:$h=$c - first_chars+=($msg) - fi - if [[ $1 ]]; then - echo q: $h $c - fi - lo -1 remote-mailq $msg - done -fi write-status if [[ $1 ]]; then cat $status_file