Is there a simple method to automatically reconnect a network drive that has been disconnected due to network failure or some other issue. I have a batch job setup that periodically copies files to a network drive, when the drive disconnects, I need to manually remount the drive.
|
Add some code to check for the mounts and to try and remount them if needed - here's some (snipped bits) from a Linux backup bash script (sorry, no OSX to hand at the moment) - it might give you some pointers and maybe someone will post an OSX equivalent too:
|
|||
|
|
|
You don't need a cronjob to poll the network share. Creating and saving an alias of the network drive in the Finder will have the Finder automatically mount the network drive when it becomes available. |
|||
|
Access the drive via Finder, this will automatically mount it in /Volumes.
Go there (Cmd+Shift+G), right click the mounted Volume and create an alias.
Now you can copy this alias wherever you like.
I used to symlink to /Volumes/MyShare with |
|||||||
|