Created
September 28, 2019 22:45
-
-
Save LordNoteworthy/b93fb3a9c00bdbe540257a4b2081d8bf to your computer and use it in GitHub Desktop.
restart-vmware
This file contains 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 | |
processString=$(ps -ef | grep '[0-9][0-9]:[0-9][0-9]:[0-9][0-9] /usr/bin/vmtoolsd -n vmusr') # get proc$ | |
tokens=( $processString ) # tokenize | |
kill "${tokens[1]}" # grab pid and kill it | |
/usr/bin/vmtoolsd -n vmusr & > /dev/null 2>&1 # restart vmtoolsd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment