X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=e03b0b5dc2afbf86be8a89183197c701d33a6aeb;hb=48389d89d65d783409b3b746919028dea8fb6219;hp=e740a8da51db5889095452dcd71db179e710ab0c;hpb=93db0c16393fe75efef3167c1d2b332f50387c23;p=distro-setup diff --git a/brc b/brc index e740a8d..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 "$@"; } @@ -2078,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