chars+=("MAILPING!")
fi
+ qlen=$(/usr/sbin/exim -bpc)
+ if ((qlen)); then
+ chars+=("q $qlen")
+ fi
if ! make -q ~/.local/distro-begin || [[ $(<~/.local/distro-begin) != 0 ]]; then
chars+=("DISTRO-BEGIN!")
## check if last snapshot was within an hour
vol=o
- snaps=(/mnt/root/btrbk/$vol.20*)
+ # this section generally copied from btrbk scripts, but
+ # this part modified to speed things up by about half a second.
+ # I'm not sure if its quite as reliable, but it looks pretty safe.
+ # Profiled it using time and also adding to the top of the file:
+ # set -x
+ # PS4='+ $(date "+%2N") '
+ snaps=($(ls -1avdr /mnt/root/btrbk/$vol.20*|head -n1))
now=$(date +%s)
maxtime=0
for s in ${snaps[@]}; do