This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' ) | |
if [[ "$loggedInUser" == "root" ]]; then | |
echo "No user logged in" | |
exit | |
else | |
echo "$loggedInUser is logged in, proceeding" | |
fi | |
if [ -d /Users/$loggedInUser/Library/Application\ Support/Google/Chrome\ Cloud\ Enrollment ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' ) | |
if [[ "$loggedInUser" == "root" ]]; then | |
echo "No user logged in" | |
exit | |
else | |
echo "$loggedInUser is logged in, proceeding" | |
fi | |
if [ -d /Users/$loggedInUser/Library/Application\ Support/Google/Chrome\ Cloud\ Enrollment ] | |
then |