X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=e03b0b5dc2afbf86be8a89183197c701d33a6aeb;hb=c831645901a69a13197d07de05b5ec2720af91cf;hp=487ee8f1dae06254b7bc6280e0053d8c18423c3b;hpb=25d20d07292550e8701e33aa409e4947f3075ede;p=distro-setup diff --git a/brc b/brc index 487ee8f..e03b0b5 100644 --- a/brc +++ b/brc @@ -342,9 +342,20 @@ b() { bbk() { c / + local active=true + if systemctl is-active btrbk.service; then + echo "cron btrbk is already running" + return 1 + fi + systemctl is-active btrbk.timer || active=false + if $active; then + ser disable btrbk.timer + fi # run latest install-my-scripts - btrbk-run "$@" + if ! btrbk-run "$@" && $active; then + ser enable btrbk.timer + fi } bfg() { java -jar /a/opt/bfg-1.12.14.jar "$@"; } @@ -353,19 +364,11 @@ bigclock() { xclock -digital -update 1 -face 'arial black-80:bold' } -bpush() { - case $HOSTNAME in - tp) target=x2 ;; - x2) target=tp ;; - esac - btrbk-run -t $target && switch-mail-host $HOSTNAME $target -} bpull() { - case $HOSTNAME in - tp) source=x2 ;; - x2) source=tp ;; - esac - btrbk-run -s $source && switch-mail-host $source $HOSTNAME + c / + # run latest + install-my-scripts + switch-mail-host $1 $HOSTNAMEs } btc() { @@ -1100,6 +1103,7 @@ jtail() { journalctl -n 10000 -f "$@" | jfilter } jr() { journalctl "$@" | jfilter | less ; } +jrf() { journalctl -f "$@" | jfilter; } kff() { # keyboardio firmware flash pushd /a/bin/distro-setup/Arduino/Model01-Firmware @@ -2085,13 +2089,10 @@ if [[ $- == *i* ]]; then bind -m vi-command W:shell-forward-word fi - if [[ $SSH_CLIENT ]]; then + if [[ $SSH_CLIENT || $SUDO_USER ]]; then PS1="\h $PS1" fi - - - prompt-command() { local return=$? # this MUST COME FIRST local psc pst ps_char ps_color stale_subvol