Posted on 11-23-2017 07:27 PM
I have tried using the script below but i keep getting error on the macs ive pushed the policy to
URLs with the type ":" are not supported
The policy logs show this error:
Executing Policy Jupiter Running script Jupiter Mount... Script exit code: 0 Script result: Protocol: serverName: -jupiter shareName: 48:75: execution error: Finder got an error: An error of type -5014 has occurred. (-5014) Relaunching dock(s)...
#!/bin/sh
protocol="$smb" # This is the protocol to connect with (afp | smb)
echo "Protocol: $smb"
serverName="$bc-jupiter" # This is the address of the server, e.g. my.fileserver.com
echo "serverName: $bc-jupiter"
shareName="$media" # This is the name of the share to mount
echo "shareName: $media"
# Mount the drive
mount_script=`/usr/bin/osascript > /dev/null << EOT
tell application "Finder"
activate
mount volume "$protocol://${serverName}/${shareName}"
end tell
EOT`
exit 0
Someone please help!
Solved! Go to Solution.
Posted on 11-23-2017 07:52 PM
@georgel
give this a try.
#!/bin/sh
protocol="smb" # This is the protocol to connect with (afp | smb)
echo "Protocol: $protocol"
serverName="bc-jupiter" # This is the address of the server, e.g. my.fileserver.com
echo "serverName: $servername"
shareName="media" # This is the name of the share to mount
echo "shareName: $sharename"
# Mount the drive
mount_script="$(/usr/bin/osascript << EOT
tell application "Finder"
activate
mount volume "${protocol}://${serverName}/${shareName}"
end tell
EOT)"
exit 0
Posted on 11-23-2017 07:39 PM
It's a bit late, and holiday over here, but it looks like you're trying to call a variable "$smb" that isn't being defined in your script? try removing the "$"
Posted on 11-23-2017 07:50 PM
dang @justinssmith i was just going to post that!
Posted on 11-23-2017 07:52 PM
@georgel
give this a try.
#!/bin/sh
protocol="smb" # This is the protocol to connect with (afp | smb)
echo "Protocol: $protocol"
serverName="bc-jupiter" # This is the address of the server, e.g. my.fileserver.com
echo "serverName: $servername"
shareName="media" # This is the name of the share to mount
echo "shareName: $sharename"
# Mount the drive
mount_script="$(/usr/bin/osascript << EOT
tell application "Finder"
activate
mount volume "${protocol}://${serverName}/${shareName}"
end tell
EOT)"
exit 0