Created
January 2, 2016 20:09
-
-
Save tofumatt/e6ee2cde27ee96362267 to your computer and use it in GitHub Desktop.
Applescript App to check connection status to NAS and reconnect every 30 seconds
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
tell application "Finder" | |
set serverName to "Bookshelf" | |
set mediaName to "Media" | |
set publicName to "Public" | |
set isConnectedToMedia to disk mediaName exists | |
set isConnectedToPublic to disk publicName exists | |
end tell | |
if isConnectedToMedia = false then | |
try | |
mount volume mediaName on server serverName | |
end try | |
end if | |
if isConnectedToPublic = false then | |
try | |
mount volume publicName on server serverName | |
end try | |
end if | |
return 30 | |
end idle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment