Created
January 22, 2018 15:49
-
-
Save blha303/d78070a370acf2b0948bba22cf35bc30 to your computer and use it in GitHub Desktop.
A script to fix the Battle.Net Agent crashing constantly on OSX with no warning or error. The elevated instance of Agent dies suddenly, leaving the user-level version doing nothing, with the frozen download meter being the only indication to users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true; do | |
ps aux | grep Battle.net | grep Agent | grep root >/dev/null | |
if [[ "$?" -eq "1" ]]; then | |
echo "Fixing Agent at "`date +%H:%M:%S` | |
kill -9 `ps aux | grep Battle.net | grep Agent | grep $USER | awk '{print $2}'` | |
fi | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment