fixes to last commit
[distro-setup] / check-remote-mailqs
1 #!/bin/bash
2 # Copyright (C) 2019 Ian Kelling
3 # SPDX-License-Identifier: AGPL-3.0-or-later
4
5 if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi
6
7 source /a/bin/errhandle/err
8
9 shopt -s nullglob
10 shopt -s dotglob
11
12
13 for h in tp.b8.nz vpn1 x2 x3.b8.nz frodo.b8.nz kd.b8.nz kw iankelling.org l2.b8.nz; do
14 if [[ $HOSTNAME == "${h%%.*}" ]]; then
15 continue
16 fi
17 if c=$(timeout 1 ssh root@$h /b/ds/check-mailq 2>/dev/null ) && [[ $c ]]; then
18 echo q:$h=$c
19 fi
20 done