megabyte-labs / install.doctor

A glorious combination of application / theme settings and a performant cross-platform, desktop-oriented software suite.
https://megabyte.space
Other
99 stars 22 forks source link

Automate "Managed" Preference #54

Closed ProfessorManhattan closed 1 year ago

ProfessorManhattan commented 1 year ago

💡 Feature/Idea

In the home/.chezmoi.yaml.tmpl file, one of the questions that is prompted asks if the computer is a "Managed" computer or a WORK_ENVIRONMENT. We can automate this question on macOS by running the following:

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
Firewall settings cannot be modified from command line on managed Mac computers.

If the response of the command contains the string, then the WORK_ENVIRONMENT should be set to true without prompting the user.

:thumbsup: Can you contribute?

No response