iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
547052c
)
make bbk account for cronjobs
author
Ian Kelling
<iank@fsf.org>
Wed, 15 May 2019 20:41:54 +0000
(16:41 -0400)
committer
Ian Kelling
<iank@fsf.org>
Wed, 15 May 2019 20:41:54 +0000
(16:41 -0400)
brc
patch
|
blob
|
history
diff --git
a/brc
b/brc
index e740a8da51db5889095452dcd71db179e710ab0c..78d28e3b59370a4cdf6b6877e9cee7cae27796c1 100644
(file)
--- a/
brc
+++ b/
brc
@@
-342,9
+342,20
@@
b() {
bbk() {
c /
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
# 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 "$@"; }
}
bfg() { java -jar /a/opt/bfg-1.12.14.jar "$@"; }