iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
show hostname in prompt whenever sudo
[distro-setup]
/
brc
diff --git
a/brc
b/brc
index e740a8da51db5889095452dcd71db179e710ab0c..e03b0b5dc2afbf86be8a89183197c701d33a6aeb 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 "$@"; }
@@
-2078,13
+2089,10
@@
if [[ $- == *i* ]]; then
bind -m vi-command W:shell-forward-word
fi
bind -m vi-command W:shell-forward-word
fi
- if [[ $SSH_CLIENT ]]; then
+ if [[ $SSH_CLIENT
|| $SUDO_USER
]]; then
PS1="\h $PS1"
fi
PS1="\h $PS1"
fi
-
-
-
prompt-command() {
local return=$? # this MUST COME FIRST
local psc pst ps_char ps_color stale_subvol
prompt-command() {
local return=$? # this MUST COME FIRST
local psc pst ps_char ps_color stale_subvol