Created
September 6, 2016 10:42
-
-
Save everm1nd/9de0f146a7601391df575493ee57a014 to your computer and use it in GitHub Desktop.
Kill VBoxHeadless process in a hard way
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
# this is quite useful when Vagrant hangs and have no response for your commands via CLI | |
if [[ $(pgrep VBoxHeadless) ]]; then | |
echo 'Found VBoxHeadless processes:' | |
pgrep VBoxHeadless | |
echo 'Terminating...' | |
pkill -9 VBoxHeadless | |
if [[ $(pgrep VBoxHeadless) ]]; then | |
echo 'Still found VBoxHeadless running. Check this PIDs:' | |
pgrep VBoxHeadless | |
else | |
echo 'All processes killed. Yay!' | |
fi | |
else | |
echo 'No VBoxProcesses found' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment