Dockutil - hidden smb share
Posted: About a minute ago by Omar
Has anyone used dockutil to mount a hidden SMB share
Using the $ to define the hidden share in the script is causing issues, is there another way to do this?
I have pasted the script in below
!/bin/bash
sleep 10
username=defaults read /Library/Preferences/com.apple.loginwindow.plist lastUserName
configureDefaultDock() {
if [ -e /usr/local/bin/dockutil ];
then
su $username -c '/usr/local/bin/dockutil --add smb://afpserver.college.farnborough/$username$ --label "My Media Drive" --position end'
else echo "dockutil not installed, skipping initial dock setup..."
fi
}
configureDefaultDock
exit 0