Skip to content

Instantly share code, notes, and snippets.

@Bas-Man
Created January 22, 2019 12:45
Show Gist options
  • Save Bas-Man/39bfa9796bc867ea233484c1478de597 to your computer and use it in GitHub Desktop.
Save Bas-Man/39bfa9796bc867ea233484c1478de597 to your computer and use it in GitHub Desktop.
Mac Shutdown AppleScript
# 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