mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 07:11:52 +01:00
fixed battle net from exiting script
This commit is contained in:
parent
44ef2f0dba
commit
3bf61fcda1
@ -1154,14 +1154,15 @@ if [[ $options == *"Battle.net"* ]]; then
|
||||
max_attempts=20
|
||||
attempt=0
|
||||
while true; do
|
||||
if pgrep -f "Battle.net.exe" || pgrep -f "BlizzardError.exe" > /dev/null; then
|
||||
if pgrep -f "Battle.net.exe" > /dev/null || pgrep -f "BlizzardError.exe" > /dev/null; then
|
||||
pkill -f "Battle.net.exe" || pkill -f "BlizzardError.exe"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
((attempt++))
|
||||
if [ "$attempt" -ge "$max_attempts" ]; then
|
||||
echo "Timeout: Battle.net process did not terminate."
|
||||
sleep 5
|
||||
((attempt++))
|
||||
if [ "$attempt" -ge "$max_attempts" ]; then
|
||||
echo "Timeout: Battle.net process did not terminate."
|
||||
break
|
||||
fi
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user