SecondSonConsulting / Baseline

An MDM agnostic zero touch solution for macOS
MIT License
192 stars 22 forks source link

Add Loginwindow Support & Unify Run Mode code #55

Closed PinkShellos closed 1 month ago

PinkShellos commented 2 months ago

Rebased code and implemented changes suggested by @BigMacAdmin in #52

Added command-line argument support for -l or --loginwindow.

Unified check_silent_option, configure_silent_mode, and wait_for_user functions under check_runmode_option.

Runmode settings defaults initiate_runmode function to wait_for_user function's behavior, otherwise it rewrites initiate_runmode to behavior of configure_silent_mode or sets the behavior to wait for the loginwindow user.

Updated implementation of functions to match new functionality. Added --loginwindow as part of the SwiftDialog arguments when LoginWindowMode is enabled.

BigMacAdmin commented 1 month ago

I dug into this today, and it looks like there's a lot more work to do to get Dialog to launch at the login window.

Challenges:

I've got some proof of concept code working, but I don't want to spend more time on that aspect of this if it's something you're actively working on. Please let me know your intentions with this PR. As-is, I can take it and use it as the basis of the LoginWindow feature, but there is significantly more work to do before it would be ready.

PinkShellos commented 1 month ago

Sounds good, I'll retract my PR and continue work back in the issue.

I'll review the SwiftDialog docs on the feature and come up with a plan.

Initial thoughts on how to handle this challenge is to have a function that creates the agent with the applicable arguments and create the JSON file with PlistBuddy.

I'll dig into this next week.