X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=switch-mail-host;h=9b4872db4b189c56245a3d31746976e027e855b9;hb=0310db0c0589445a132e77f0b7a8fbb5e1ae3082;hp=bac21484c89dc93ec67969c330a44377eecc9572;hpb=7a82762b44f4732f6b075a0cb5d8b258f5022d12;p=distro-setup diff --git a/switch-mail-host b/switch-mail-host index bac2148..9b4872d 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 @@ -197,7 +206,7 @@ target send-receive $btrbk_dst EOF -sudo btrbk run +sudo btrbk -l debug --progress run $new_shell mount-latest-subvol mail-setup "$new_shell" @@ -208,3 +217,7 @@ fi if $restore_old_btrbk; then $old_shell sudo systemctl start btrbk.timer fi + +$new_shell DISPLAY=:0 arbtt-capture --sample-rate=10 & + +echo $warn