Script Good Syntax - Add Share smb on the Dock

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
03-04-2019
06:23 AM
- last edited on
03-04-2025
09:19 AM
by
kh-richa_mig
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
- Labels:
-
Jamf Pro
