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
EOF
-sudo btrbk run
+sudo btrbk -l debug --progress run
$new_shell mount-latest-subvol
mail-setup "$new_shell"
if $restore_old_btrbk; then
$old_shell sudo systemctl start btrbk.timer
fi
+
+$new_shell DISPLAY=:0 arbtt-capture --sample-rate=10 &
+
+echo $warn