diff --git a/development.sh b/development.sh index 65e2197..704b818 100644 --- a/development.sh +++ b/development.sh @@ -33,3 +33,14 @@ sudo chmod 644 /etc/chrony.d/chrony.conf #Install Rosetta softwareupdate --install-rosetta + +umask 022 + +# Setup Edge Enterprise Policies +sudo mkdir -p '/Library/Tomster Corporation/scripts/' '/Library/Tomster Corporation/prefs/' '/Library/Managed Preferences' +curl https://raw.githubusercontent.com/TommyTran732/macOS-Setup-Script/etc/Library/Tomster%20Corporation/apply_prefs.sh | sudo tee '/etc/Library/Tomster Corporation/apply_prefs.sh' +sudo chmod 744 '/Library/Tomster Corporation/scripts/apply_prefs.sh' +curl https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/macOS/Managed%20Preferences/com.microsoft.Edge.plist | sudo tee '/Library/Tomster Corporation/prefs/com.microsoft.Edge.plist' +curl https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/macOS/Preferences/com.microsoft.Edge.plist | sudo tee /Library/Preferences/com.microsoft.Edge.plist +curl https://raw.githubusercontent.com/TommyTran732/macOS-Setup-Script/etc/Library/LaunchDaemons/io.tommytran.prefs.list | sudo tee /etc/Library/LaunchDaemons/io.tommytran.prefs.list +sudo launchctl load /Library/LaunchDaemons/io.tommytran.prefs.plist \ No newline at end of file diff --git a/etc/Library/LaunchDaemons/io.tommytran.prefs.plist b/etc/Library/LaunchDaemons/io.tommytran.prefs.plist new file mode 100644 index 0000000..bb5c954 --- /dev/null +++ b/etc/Library/LaunchDaemons/io.tommytran.prefs.plist @@ -0,0 +1,16 @@ + + + + + Label + io.tommytran.prefs + RunAtLoad + + LaunchOnlyOnce + + ProgramArguments + + /Library/Tomster Corporation/scripts/apply_prefs.sh + + + \ No newline at end of file diff --git a/etc/Library/Tomster Corporation/scripts/apply_prefs.sh b/etc/Library/Tomster Corporation/scripts/apply_prefs.sh new file mode 100644 index 0000000..5d991c8 --- /dev/null +++ b/etc/Library/Tomster Corporation/scripts/apply_prefs.sh @@ -0,0 +1,4 @@ +#!/bin/zsh + +/bin/sleep 5 +/bin/cp -r '/Library/Tomster Corporation/prefs/' '/Library/Managed Preferences/' \ No newline at end of file diff --git a/primary.sh b/primary.sh index 03c46fc..17ad776 100644 --- a/primary.sh +++ b/primary.sh @@ -13,4 +13,15 @@ echo "VerifyHostKeyDNS yes" | sudo tee /etc/ssh/ssh_config.d/10-custom.conf sudo chmod 644 /etc/ssh/ssh_config.d/10-custom.conf # Enable Safari debug menu -defaults write com.apple.Safari IncludeInternalDebugMenu 1 \ No newline at end of file +defaults write com.apple.Safari IncludeInternalDebugMenu 1 + +umask 022 + +# Setup Edge Enterprise Policies +sudo mkdir -p '/Library/Tomster Corporation/scripts/' '/Library/Tomster Corporation/prefs/' '/Library/Managed Preferences' +curl https://raw.githubusercontent.com/TommyTran732/macOS-Setup-Script/etc/Library/Tomster%20Corporation/apply_prefs.sh | sudo tee '/etc/Library/Tomster Corporation/apply_prefs.sh' +sudo chmod 744 '/Library/Tomster Corporation/scripts/apply_prefs.sh' +curl https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/macOS/Managed%20Preferences/com.microsoft.Edge.plist | sudo tee '/Library/Tomster Corporation/prefs/com.microsoft.Edge.plist' +curl https://raw.githubusercontent.com/TommyTran732/Microsoft-Edge-Policies/main/macOS/Preferences/com.microsoft.Edge.plist | sudo tee /Library/Preferences/com.microsoft.Edge.plist +curl https://raw.githubusercontent.com/TommyTran732/macOS-Setup-Script/etc/Library/LaunchDaemons/io.tommytran.prefs.list | sudo tee /etc/Library/LaunchDaemons/io.tommytran.prefs.list +sudo launchctl load /Library/LaunchDaemons/io.tommytran.prefs.plist \ No newline at end of file