Skip to content

Instantly share code, notes, and snippets.

@ianiv
Created February 2, 2021 04:26
Show Gist options
  • Save ianiv/56b0e0e92e30c7fc7c311edcb2eab91d to your computer and use it in GitHub Desktop.
Save ianiv/56b0e0e92e30c7fc7c311edcb2eab91d to your computer and use it in GitHub Desktop.
!/bin/bash
osascript <<EOD
tell application "Finder"
if not (disk "VolumeName" exists) then
mount volume "smb://user:password@hostname/VolumeName"
end if
end tell
EOD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment