Skip to content

Commit

Permalink
Merge pull request #150 from ChefAustin/patch-1
Browse files Browse the repository at this point in the history
Add detection for root user
  • Loading branch information
natewalck authored Mar 10, 2021
2 parents e503042 + 51ff036 commit 9fa4b1d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build_assets/postinstall-launchagent
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ if [[ $3 == "/" ]] ; then
echo "Detected Loginwindow Environment"
elif [[ "$console_user" == "_mbsetupuser" ]]; then
echo "Detect SetupAssistant Environment"
elif [[ "$console_user" == "root" ]]; then
echo "Detect root as currently logged-in user"
else
# Unload the agent so it can be triggered on re-install
/bin/launchctl asuser "${console_user_uid}" /bin/launchctl unload -w "$3${launch_agent_base_path}${launch_agent_plist_name}"
Expand Down

0 comments on commit 9fa4b1d

Please sign in to comment.