Hi all
I have tried this script from jamf it works locally but not being pushed
its an AD environment and it to redirect the music folder in documents
does anybody have experience of this
!/bin/bash
Get current logged in username
CURRENTUSER=$(stat -f %Su /dev/console)
Get current AD user name
ADUSER=$(id -F)
Skip redirection if user is localadmin
if [ "$CURRENTUSER" == "xmaadmin" ]; then
echo "xma admin, skipping folder redirection"
exit
fi
sleep 5
MYDOCDIR="/Volumes/homes$/"$ADUSER"/Documents"
echo $MYDOCDIR
if [ -d "$MYDOCDIR" ]; then
echo "$MYDOCDIR is Available!"
else
echo "$MYDOCDIR is Empty"
sleep 5
fi
ECHO ----------------- Redirecting Folders ---------------
Wait for OS X to Create Local Homes
sleep 4
ln -Ffhs "/Volumes/homes$/$ADUSER/Documents/My Music" "/Users/$CURRENTUSER/Music/GarageBand"
ECHO ----------------- Completed Script -------------------
$SLEEP 4
killall Finder
exit