I am trying to set up an extension attribute that will show whether an application has been run on individual systems. When launched, the app creates a directory at the user level. I'm trying to find a way to output whether that directory is present, but I don't think it's working. It shows that the app is not in use on every machine. Can anyone tell me what is wrong with the script I set up below?
!/bin/bash
if [ -d "/Users/${loggedInUser}/Library/ndOneClick/Working Documents" ]; then
echo "<result>ndOneClick in use</result>"
else
echo "<result>Not in use</result>"
fi
exit