From 51ff0365892863206e4f3b162df47ccaa23a83a6 Mon Sep 17 00:00:00 2001 From: Austin Culter Date: Wed, 10 Mar 2021 17:31:25 +0100 Subject: [PATCH] Add detection for root user on the tin. --- build_assets/postinstall-launchagent | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_assets/postinstall-launchagent b/build_assets/postinstall-launchagent index 4484acf0..d03577dc 100755 --- a/build_assets/postinstall-launchagent +++ b/build_assets/postinstall-launchagent @@ -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}"