adds zfs for server and brave search no longer kills brave

This commit is contained in:
2024-11-15 16:05:20 +01:00
parent 5907d7a4e8
commit 5f83cf2e6d
3 changed files with 307 additions and 30 deletions

View File

@ -3,27 +3,6 @@
BRAVE_DIR="$HOME/.config/BraveSoftware/Brave-Browser/Default"
MAX_ATTEMPTS=30 # Maximum number of seconds to wait
# Function to kill all Brave processes
kill_brave() {
# Store whether Brave was running
if pgrep -x "brave" > /dev/null; then
echo "Brave was running, will restart after completion"
export BRAVE_WAS_RUNNING=1
else
export BRAVE_WAS_RUNNING=0
fi
echo "Closing all Brave browser instances..."
pkill -x "brave" || true
sleep 2 # Give it a moment to clean up
# Force kill if any processes remain
if pgrep -x "brave" > /dev/null; then
echo "Force closing remaining Brave processes..."
pkill -9 -x "brave" || true
fi
}
# Function to check if database is locked
is_db_locked() {
local db_file="$1"
@ -46,9 +25,6 @@ if [ ! -f "$BRAVE_DIR/Web Data" ]; then
exit 1
fi
# Kill any running Brave instances
kill_brave
# Wait for database to be unlocked
attempts=0
while is_db_locked "$BRAVE_DIR/Web Data" && [ $attempts -lt $MAX_ATTEMPTS ]; do