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 "$@"; }