Created
January 22, 2019 12:45
-
-
Save Bas-Man/39bfa9796bc867ea233484c1478de597 to your computer and use it in GitHub Desktop.
Mac Shutdown AppleScript
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
# Current under Dev | |
#Drobo Dashboard does not appear to respond to quit command. | |
# Drobo is the name of the drive to be unmounted. This should be changed to | |
# your own needs. | |
tell application "NordVPN" to quit | |
tell application "Plex Media Server" to quit | |
tell application "Dropbox" to quit | |
tell application "Drobo Dashboard" to quit | |
#Give Apps times to exit | |
delay 30 | |
tell application "Finder" | |
if disk "Drobo" exists then | |
eject disk "Drobo" | |
end if | |
end tell | |
set diskIsMounted to true | |
repeat until diskIsMounted is false | |
tell application "Finder" | |
if (disk "Drobo" exists) then | |
delay 10 | |
else | |
set diskIsMounted to false | |
end if | |
end tell | |
end repeat | |
# Shutdown Server | |
#tell application "Finder" to shutdown |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment