X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=brc;h=78d28e3b59370a4cdf6b6877e9cee7cae27796c1;hp=e740a8da51db5889095452dcd71db179e710ab0c;hb=46adb986f6068b13c086a15aad90a42fcbe099c0;hpb=547052c0f1697e6e12668d62693d1c21263a094a diff --git a/brc b/brc index e740a8d..78d28e3 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 "$@"; }