-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkill_chrome.sh
More file actions
executable file
·37 lines (31 loc) · 1.18 KB
/
Copy pathkill_chrome.sh
File metadata and controls
executable file
·37 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Script para matar todos os processos do Chrome/Chromium
#
# Uso: ./kill_chrome.sh
#
# Este script mata todos os processos relacionados ao Chrome e Chromium,
# incluindo processos auxiliares e renderizadores.
echo "Encerrando processos do Chrome/Chromium..."
# Matar processos do Google Chrome
if pgrep -fi "Google Chrome" > /dev/null || pgrep -fi "chrome" > /dev/null; then
echo " - Encerrando Google Chrome..."
pkill -9 -fi "Google Chrome" 2>/dev/null
pkill -9 -fi "chrome" 2>/dev/null
fi
# Matar processos do Chromium
if pgrep -fi "Chromium" > /dev/null || pgrep -fi "chromium" > /dev/null; then
echo " - Encerrando Chromium..."
pkill -9 -fi "Chromium" 2>/dev/null
pkill -9 -fi "chromium" 2>/dev/null
fi
# Verificar se ainda há processos
if pgrep -fi chrome > /dev/null || pgrep -fi chromium > /dev/null; then
echo " ⚠️ Ainda há processos Chrome/Chromium em execução. Tentando forçar encerramento..."
pkill -9 -fi chrome 2>/dev/null
pkill -9 -fi chromium 2>/dev/null
killall -9 "Google Chrome" 2>/dev/null
killall -9 "Chromium" 2>/dev/null
else
echo " ✓ Todos os processos Chrome foram encerrados."
fi
echo "Concluído!"