X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=switch-mail-host;h=9315807d6ca00196574a06d967158c951f7becfc;hb=dd2ab37728aeaf8b887d128c50601fb5d9bd8841;hp=96e03ef494e911ed4fce3cfef7ef5589e45b0567;hpb=aeb3f88455a90def90a645a7b5567d55dda18339;p=distro-setup diff --git a/switch-mail-host b/switch-mail-host index 96e03ef..9315807 100755 --- a/switch-mail-host +++ b/switch-mail-host @@ -120,6 +120,15 @@ if $old_shell systemctl is-active btrbk.timer; then restore_old_btrbk=true fi +for ((i=0; i<10; i++)); do + $old_shell killall arbtt-capture || break + sleep 1 + if [[ i == 9 ]]; then + warn="WARNING!!! failed to kill arbtt-capture" + fi + done + + $new_shell bash -s <<'EOF' set -eE if mountpoint /m; then sudo umount /m; fi @@ -208,3 +217,7 @@ fi if $restore_old_btrbk; then $old_shell sudo systemctl start btrbk.timer fi + +$new_shell arbtt-capture --sample-rate=10 & + +echo $warn