X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=9bc89d5158c499ff9892e08c26e1f193f5dcc690;hb=62dede3e7ad2c0ee566145f3efabf1fd23df46a7;hp=6effa21c788e939e514c7a1c17887bae135c9bea;hpb=671538dd70b9aa0f1b38192b51dd0716e29eb6f0;p=distro-setup diff --git a/brc2 b/brc2 index 6effa21..9bc89d5 100644 --- a/brc2 +++ b/brc2 @@ -282,6 +282,26 @@ aclear() { system-status _ } +alerts() { + find /var/local/cron-errors /home/iank/cron-errors /sysd-mail-once-state -type f +} +ralerts() { # remote alerts + local ret shell + # this list is duplicated in check-remote-mailqs + for h in bk je li frodo kwwg x3wg x2wg kdwg sywg; do + echo $h: + shell="ssh $h" + if [[ $HOSTNAME == "${h%wg}" ]]; then + shell= + fi + ret=0 + $shell find /var/local/cron-errors /home/iank/cron-errors /sysd-mail-once-state -type f || ret=$? + if (( ret )); then + echo ret:$ret + fi + done +} + ap() { # pushd in case current directory has an ansible.cfg file pushd /a/xans >/dev/null @@ -630,6 +650,9 @@ digme() { digdiff @ns{1,2}.iankelling.org "$@" } +tsr() { # ts run + "$@" |& ts || return $? +} dup() { local ran_d @@ -638,20 +661,20 @@ dup() { case $PS1 in *[\ \]]D\ *) pushd / - /b/ds/distro-begin || return $? - /b/ds/distro-end || return $? + /b/ds/distro-begin |& ts || return $? + /b/ds/distro-end |& ts || return $? popd ran_d=true ;;& *[\ \]]DB\ *) pushd / - /b/ds/distro-begin || return $? + /b/ds/distro-begin |& ts || return $? popd ran_d=true ;; *[\ \]]DE\ *) pushd / - /b/ds/distro-end || return $? + /b/ds/distro-end |& ts || return $? popd ran_d=true ;;&