*) echo "$(date): Bad call of function GoogleDrive"Įcho "$(date): GoogleDrive " # Actually stop all users if we found any that are running, otherwise just say they are all stoppedĮcho "$(date): No Google Backup and Sync Processes were running" If ps -p $pidtokill | grep "Backup\ and\ Sync"> /dev/nullĮcho "$(date): Stopping backup and Sync for user $user"Įcho "$(date): Google Backup and Sync user $user is not running" Pidtokill=$(cat $HOME/Library/Application\ Support/Google/Drive/$dirname/pid) Also don't know what the results of the osascript call is when there are multiple users.įunction GoogleBackup ' | sed 's///g') I have a script to do that, but I don't have multiple users anymore, so not sure it still works, but for what it's worth it's below. Note that if you have multiple users configured in Backup and Sync, you'll have to figure out the PID of the correct user, and then kill it. Osascript -e 'quit app "Backup and Sync"' Osascript -e 'tell application "Backup and Sync" to activate' This is ALSO what osascript also knows it as, so you can do: "Backup and Sync from Google" is just branding. In fact, if you look in the applications directory with finder and do a "get info" it will show you the real application name. It shows that the process name has no "from Google" in it. If you do:ĥ01 37327 1 0 3:37PM ? 0:06.37 /Applications/Backup and Sync.app/Contents/MacOS/Backup and Sync The reason the "\ from\ Google" doesn't work is because that is not what the process is, there is no "from Google in the process name. This post is old, but I struggled with it, so I thought I'd help.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |