Script Good Syntax - Add Share smb on the Dock

SyndexMacMaster
New Contributor

Hello everybody,

Thanks for your help and you answer, I'm new user JAMF administration :

Question :

> I have a script Shell it work I fou execute since ''Terminal", this script detail execute the following command : Add Share Link on the Dock :

Before JAMF

!/bin/bash

LINK_TITLE3='Name Share'
LINK_URL3='smb://share1/Groupes

Check if the link already exists in the Dock ##

if ! defaults read com.apple.dock persistent-others | grep -q $LINK_URL3
then

Insert the link into the dock plist

defaults write com.apple.dock persistent-others -array-add "<dict><key>tile-data</key><dict><key>label</key><string>$LINK_TITLE3</string><key>url</key><dict><key>_CFURLString</key><string>$LINK_URL3</string><key>_CFURLStringType</key><integer>15</integer></dict></dict><key>tile-type</key><string>url-tile</string></dict>"

But : I try to import the Script ad to adapt for Jamf variable, it don't works !???...

With JAMF

This script -----> change the variable -------> For :

/usr/local/bin/dockutil --add smb://share/Groupes/ --label 'Name Share' --position end --no-restart /Users/$3

Thanks for the community your helping !

Regards

0 REPLIES 0